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

Failing to find module when run #8

Closed
madmacks59 opened this issue Jun 3, 2019 · 2 comments
Closed

Failing to find module when run #8

madmacks59 opened this issue Jun 3, 2019 · 2 comments

Comments

@madmacks59
Copy link

Odd thing, I installed the packages using the standard process (pip install solarshed, and pip3 install solarshed), and originally things worked fine. Was able to start the server process and then use your curl example to grab values from the Renogy control.

Now, I'm writing a small python program to try and access the values using the methods you provide (sample in your readme file).

I have an import as follows:
from solarshed.controllers.renogy_rover import RenogyRover

when I try and run the code I get:

File "/home/pi/renogytest.py", line 2, in
from solarshed import *
ImportError: No module named 'solarshed'

I just reran the pip installs, which seem to have worked, but still have the same problem.

Any ideas? I'm currently looking at my paths and am also trying to find the installed packages, not any feedback would be appreciated...

@madmacks59
Copy link
Author

Never mind, I found the problem (user error). All the packages installed properly, and my python path was fine. Turned out to be the following. I have a Pi with a 7" touch display, and I also run VNC Viewer on my MacBook Pro. Because the window session on the Pi is defined to use the 7" touch display I set up a separate session on the Pi with a larger virtual display, and that is what I attach to from my MacBook. Anyway, I'd build everything out and installed the packages directly on the Pi but the second VNC session apparently didn't pick up the pathing or the packages. Once I new the paths were correct and that packages were installed properly I killed and restarted that second session, and apparently when the new bash environment started it cleared up the pathing problem. Anyway, problem resolved...

@corbinbs
Copy link
Owner

corbinbs commented Jun 3, 2019

Hi @madmacks59 ,

Glad you were able to work this one out!

Thanks,

Brian

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