bulletin's People
Forkers
tcgarvinbulletin's Issues
OpenAI Unsupported filetype / mimetype
Stemming from info_extract.py:43
Error in GitHub Actions - openai.BadRequestError: Error code: 400 - {'error': {'message': 'Failed to index file: Unsupported file file-tFiVBt35bty0KgRF07lDToFL type: application/octet-stream error_code: unhandled_mimetype', 'type': 'invalid_request_error', 'param': None, 'code': None}}
With certain bulletins, something happens to the download or with the saving of the file, causing this error to be thrown.
See the Masstime-extractor log for more details.
Data Verification
Implement some sort of data verification, even something as simple as comparing old data to new data, and setting a flag if there's a change or if there's a big change - the idea being that parishes won't often have big changes to their mass schedules, so something out of the ordinary (an extra Mass, an evening Mass, etc) should be easy to spot.
Quantity Cap
Looks like DM has a cap at how many PDFs can be viewed per day. Perhaps in the 20-25 range? Could be more. Will have to add logic to stay within this limit.
Upon downloading past the cap, the user receives this message:
"Maximum number of files downloaded today."
PyPDF2 sees this as a missing EOF marker
OpenAI Returns Empty JSON
OpenAI assistant will occasionally return empty JSON. Just need to catch this error, I think.
Traceback (most recent call last):
File "/home/runner/work/bulletin/bulletin/main.py", line 111, in <module>
main()
File "/home/runner/work/bulletin/bulletin/main.py", line 108, in main
run_parish(parish_id, config, args.dry_run, args.verbose)
File "/home/runner/work/bulletin/bulletin/main.py", line 61, in run_parish
mass_times = get_mass_times(openai_client, config.bulletin_assistant_id, temp_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/bulletin/bulletin/info_extract.py", line 69, in get_mass_times
response_json = json.loads(json_str)
^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.