Skip to content

Not all boards have json, so gracefully fallback if not present #28

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

Closed
hamslabs opened this issue Dec 18, 2020 · 3 comments · Fixed by #29
Closed

Not all boards have json, so gracefully fallback if not present #28

hamslabs opened this issue Dec 18, 2020 · 3 comments · Fixed by #29
Assignees

Comments

@hamslabs
Copy link

adafruit_slideshow.py imports json and it isn't defined anywhere in circuitpython or the bundle.

@dhalbert
Copy link
Contributor

json is built into most but not all builds of CIrcuitPython. There is not a separate library. So you may be using a small build that doesn't have room, or an old build (it used to be called ujson).

@dhalbert dhalbert changed the title adafruit_slideshow.py - ImportError: no module named 'json' Not all boards have json, so gracefully fallback if not present Dec 18, 2020
@dhalbert
Copy link
Contributor

dhalbert commented Dec 18, 2020

The text file support assumes the json module exists, which isn't true on SAMD21 builds. The code should fall back gracefully if import json fails. The OP was trying to use a CPX with a TFT Gizmo.
@FoamyGuy

@FoamyGuy FoamyGuy self-assigned this Dec 18, 2020
@FoamyGuy
Copy link
Contributor

I can make this change tonight. I will catch the ImportError and add a note indicating text slides require json

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

Successfully merging a pull request may close this issue.

3 participants