-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyerror #521
Comments
Thanks for taking the time to post your issue here! We seem to use the "custom stream" solution on ACRCloud and ours looks like this in the dashboard: Are you also using the broadcast monitoring product? I'll probably also need a JSON dump from ACRCloud to debug this further. Are you comfortable with tools like A potential fix might be to ignore the "played_duration" field if it's not available. Let's figure out why you don't have it first and then proceed from there! Cheers, |
Yes, we are using broadcast monitoring also. Attached is results exported with curl from one day; I don't see 'Played Duration' info there, but if I export results from Console, it is there. |
Thanks for the dump! I think i can narrow down the issue... Our bucket looks like this: it uses a "non-realtime for music" profile that is configured like so:
When i look you your JSON, it seems to be configured to use a real-time configuration. {
"data": [
{
"metadata": {
"type": "real-time",
As far as i understand it the real-time profile is meant for building things like a "now playing" feature for a website, while the "non real-time" profiles are for broadcast monitoring and reporting. The "non real-time" profiles take a while until they return data, we usually get data some 10-20 minutes after we play a track. For our purpose the trade-off was that we get more concise reporting data from acrcloud. Can you try if a "non real-time" configuration makes the |
results150724.csv |
I've not been able to reproduce the error with results150724.csv. Maybe it doesn't work because the code tries to download results140724.csv at the same time. The code does this if the local timezone does not match UTC. Can you provide a file for 2024-07-14 to help me verify this? Also, do you still get the error if you try exporting a later date? edit: I generated an xlsx based on results150724.csv: rollfm_2024-07-16.xlsx. |
Tested containerized code with following script:
sudo podman run --rm -ti -e BEARER_TOKEN=token -e STREAM_ID=s-xxxxxxxx ghcr.io/radiorabe/suisasendemeldung:latest suisa_sendemeldung --project-id=xxxxx --timezone=Europe/Xxxxxxxx --file --filetype=xlsx
Scritp loads results from ACRCloud, but gives the following error:
File "/usr/local/bin/suisa_sendemeldung", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/suisa_sendemeldung/suisa_sendemeldung.py", line 865, in main
data = merge_duplicates(data)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/suisa_sendemeldung/suisa_sendemeldung.py", line 427, in merge_duplicates
prev["metadata"]["played_duration"]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'played_duration'
What causes error?
The text was updated successfully, but these errors were encountered: