Closed caternuson closed 2 years ago
How about?
seesaw neopixel being imported from unexpected location - is seesaw neopixel use intended?
I'm thinking the issue might not go away completely. But at least will be much easier to diagnose - based on exception message. Doubt there's a simple and concise message that would help people completely self remedy. They'll likely still ask "why this message?" etc.
How about?
seesaw neopixel being imported from unexpected location - is seesaw neopixel use intended?
This wording sounds good to me.
Agree it's unlikely to go away completely but making the error easier to understand will make it easier to spot and probably increase the number of folks who can suggest the fix. Thanks for the improved error messaging @caternuson!
OK, message updated.
Yah, I'm not sure what the most robust logic would be. Could also do:
if "adafruit_seesaw" not in __name__:
My two cents - just go with current logic and see how well it plays in the wild?
Sounds like a plan!
A common issue is copying the seesaw version of
neopixel.py
intoCIRCUITPY/lib
instead of the "regular" non-seesawneopixel.py
. Then, when attempting to run a non-seesaw neopixel example, get:This PR adds a simple path check to the seesaw
neopixel.py
to make sure it is located in aadafruit_seesaw
folder. This should hopefully throw a more obvious error for the above scenario.Attempting to import seesaw
neopixel.py
located inCIRCUITPY/lib
:Attempting to import seesaw
neopixel.py
located inCIRCUITPY/lib/adafruit_seesaw
: