0

I've written a little programme that takes a latitude and longitude and returns a forecast power generation for the site, using pvlib's ModelChain() and get_processed_data() methods, per the documentation.

It was all working fine until about an hour ago, when - without having made any changes to my python code - I suddenly started getting the following error:

ImportError: The Linke turbidity lookup table requires scipy. You can still use clearsky.ineichen if you supply your own turbidities.

A quick google tells me this is related to the "clearsky" module within pvlib - see http://pvlib-python.readthedocs.io/en/latest/_modules/pvlib/clearsky.html

However, I've got no idea why this suddenly isn't working, or what's changed. I've tried 'pip install scipy' in my IDE (cloud9), and get the response:

Requirement already satisfied: scipy in /opt/pyenv/versions/3.6.0/lib/python3.6/site-packages Requirement already satisfied: numpy>=1.8.2 in /opt/pyenv/versions/3.6.0/lib/python3.6/site-packages (from scipy)

If anyone can help, I'd be hugely grateful - I was "this close" to finishing my project!

  • You changed either where the IDE is looking up your python-interpreter or broke your scipy distribution. This problem surely is not much related to python or scipy. The core-problem seems to be the IDE-setup / scipy-setup. You can manually open up your interpreter within this environment (```/opt/pyenv/versions/3.6.0/python```?) and import scipy to get *some* indication if the scipy-setup is working. – sascha Dec 04 '17 at 16:42
  • Thanks sascha. I've followed the IDE's documentation to make sure that scipy, numpy and pvlib are all installed. I'm still getting the same error. I also get the following error: Exception ignored in: ResourceWarning: unclosed I'd be grateful for any further thoughts! – Matt Friend Dec 05 '17 at 10:34
  • Also, I don't know how to mnaually open the interpreter within the environment /opt/pyenv/versions/3.6.0/python... it's a cloud-based online IDE. – Matt Friend Dec 05 '17 at 10:35
  • Finally, if I type ls /opt/pyenv/versions/3.6.0/lib/python3.6/site-packages in my terminal, I can see that the scipy module is installed – Matt Friend Dec 05 '17 at 11:00
  • OK, another comment. Over the past two hours, my code has started working again, and now stopped again with the same errors and warnings. I haven't made any changes to the code. 2 hours ago I reinstalled scipy. At that point it still didn't work. 30 minutes later, it started working: no resource warnings or exceptions, no errors finding scipy. Now it's not working again, same errors and warnings. One thought - my cloud-based IDE was announced yesterday as having been acquired by AWS - maybe some bugs due to integration and migration??? – Matt Friend Dec 05 '17 at 13:06
  • UPDATE: I've just noticed that the Cloud9 IDE is now giving alerts about the javascript file that calls the Python function that uses the pvlib module. Specifically, a small triangle containing an exclamation mark has appeared in a few places saying "Move function declaration to function body root." This doesn't stop the javascript functions running - e.g. the info window opens, just without the content that the use of pvlib should provide. But maybe it's causing some problem in getting the Python code to run...? NB, these warnings didn't happen until the most recent update to Cloud9 IDE. – Matt Friend Dec 06 '17 at 22:26

1 Answers1

5

I fixed the issue while installing the "Hierarchical datasets for Python" package, thought the following command line :

pip install tables 
Jérôme B
  • 420
  • 1
  • 6
  • 25