Skip to content
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

Introduction of firework.css in AI on the edge firmware appears to have broken collectmeterdigits #12

Closed
ashdriver opened this issue Feb 6, 2023 · 1 comment

Comments

@ashdriver
Copy link

ashdriver commented Feb 6, 2023

Since upgrading AI on the edge firmware to rev 14, collecting images results in the error:

Traceback (most recent call last):
File "collectmeterdigits_main_.py", line 39, in
main()
File "collectmeterdigits_main_.py", line 34, in main
collect(args.collect, args.days, keepolddata=args.keepdownloads, download=not args.nodownload, startlabel=args.startlabel)
File "collectmeterdigits\collect.py", line 193, in collect
readimages(meter, target_raw_path, days)
File "collectmeterdigits\collect.py", line 69, in readimages
img = Image.open(requests.get(serverurl+url, stream=True).raw)
File "PIL\Image.py", line 3147, in open
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000002F32624E270>
[99400] Failed to execute script 'main' due to unhandled exception!

By filtering the list of urls in collect.py for only those ending in jpg I have avoided this issue, it appeared to by interpreting firework.css as an image file.

@ashdriver ashdriver changed the title Introduction of firework.css in AI on the edge firmware appears to have broken collecimages Introduction of firework.css in AI on the edge firmware appears to have broken collectmeterdigits Feb 6, 2023
haverland added a commit that referenced this issue Feb 6, 2023
fix loading imager after v14 of AIonedge #12
@haverland
Copy link
Owner

Fixed with v1.0.3

haverland added a commit that referenced this issue Feb 11, 2023
fix false "endswith"=jpg (#12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants