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

ImportError #121

Open
jsmwrench opened this issue Nov 20, 2022 · 2 comments
Open

ImportError #121

jsmwrench opened this issue Nov 20, 2022 · 2 comments

Comments

@jsmwrench
Copy link

Hello.

After following the instructions (several times, same result), I keep getting the "ImportError" that states:
Quote: File "/home/Pi/Documents/LED_test.py", line 1, in
from pfirmata import Arduino, util
ImportError: cannot import name 'Arduino' from 'pyfirmata' (/home/Pi/Documents/pyfirmata.py) :End Quote

What can I do to resolve this?

Thank you,
Ron.

@Fat-Fox
Copy link

Fat-Fox commented Nov 20, 2022

try:

from pyfirmata import Arduino, util

you are missing the "y" in qour Quote. make also sure that the module is in your script directory or manipulate the search path accordingly.

@jsmwrench
Copy link
Author

I'm really new to Pi and Python programming, but I figured out that I had to find and copy the pyfirmata folder into the same folder as my sketch. It's working now. I have to assume this is like the Libraries in Arduino where all of the Libraries being used have to be in a pre-defined folder within the program. Is this correct? Are the Libraries for Python supposed to reside in "/pythonX.X/dist-packages"? Should I then keep all of my sketches in the same folder?

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