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

PYOWM module nor found random #355

Closed
tjerram opened this issue Nov 17, 2020 · 5 comments
Closed

PYOWM module nor found random #355

tjerram opened this issue Nov 17, 2020 · 5 comments

Comments

@tjerram
Copy link

tjerram commented Nov 17, 2020

I have a python application that includes a file with pyowm as an include. everything works fie most of the time but my application randomly fails with an error that says pyowm module not found. The weird part is that the min application I am running doesn't use pyowm or any of the functions in the include file that require pyowm. The include file works fine with other applications that do use the pyowm functions and they never seam to fail. Any thoughts

@csparpa
Copy link
Owner

csparpa commented Nov 19, 2020

@tjerram you'll have a VERY hard time convincing me about errors randomly occurring WITHOUT providing any context/code of yours... :)

So please bring some evidence so we can debug!

@tjerram
Copy link
Author

tjerram commented Nov 19, 2020 via email

@csparpa
Copy link
Owner

csparpa commented Nov 21, 2020

Mmmm that looks weird

Usually a "module not found" error either means that the module is not installed or that Python can't manage to find it

So, just to understand (please confirm/amend):

  • your app is a sort of a server/loop that runs forever or is it a croned app ?
  • you import pyowm but don't use any of its functionality

Provided that the above points are confirmed, I have a few questions to help you & me debug:

  • do you import other third-party libraries into your app ?
  • what do you mean with "the min application I am running doesn't use pyowm or any of the functions in the include file that require pyowm" ? Can you provide the code structure of your app (eg. how modules are organized, what is the main include file you refer to, etc.) ?
  • can you please post the full error stack trace here?
  • what env/OS are you running your app on ?
  • how did you install PyOWM ? Is it installed into the "standard" path for third party Python libraries on your env/OS (if you installed it with pip you can check this with pip show pyowm) ?

With these info we can try to reason on some possible causes

Also, please try to print out the PYTHONPATH just before you import pyowm / the inlcude file that imports pyowm and check if it looks consistent across runs

As far as the nohup.out not reporting the error, that might be because your stderr is not redirected into it

Waiting for your answeres buddy
thanks

@tjerram
Copy link
Author

tjerram commented Nov 26, 2020 via email

@csparpa
Copy link
Owner

csparpa commented Nov 27, 2020

good! :) glad it works now

@csparpa csparpa closed this as completed Nov 27, 2020
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