After Update "No module named requests"

156 views
Skip to first unread message

Joakim Thulin

unread,
Jul 15, 2018, 3:23:37 AM7/15/18
to pywws
Good morning, I just updated to 18.6.3 and run into problems. Could anyone give me a clue on what is wrong here?

Best regards,
Joakim T.

From live_logger.log:
2018-07-15 09:09:04:pywws.logger:pywws version 18.6.3, build 1559 (b47a2cf)
2018-07-15 09:09:06:pywws.livelogdaemon:No module named requests
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pywws/livelogdaemon.py", line 124, in run
    pywws.livelog.live_log(self.data_dir)
  File "/usr/local/lib/python2.7/dist-packages/pywws/livelog.py", line 77, in live_log
    tasks = pywws.regulartasks.RegularTasks(context)
  File "/usr/local/lib/python2.7/dist-packages/pywws/regulartasks.py", line 106, in __init__
    mod = importlib.import_module('pywws.service.' + name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/pywws/service/underground.py", line 59, in <module>
    import requests
ImportError: No module named requests

From weather.ini:
[config]
ws type = 1080
usb activity margin = 3.0
pressure offset = 4
logdata sync = 1
day end hour = 21, False
gnuplot encoding = utf8
template encoding = utf-8
language = sv
rain day threshold = 0.2
gnuplot version = 5.0
frequent writes = False
asynchronous = False

[paths]
work = /home/pi/weather/tmp/
templates = /home/pi/weather/templates/
graph_templates = /home/pi/weather/graph_templates/
local_files = /home/pi/weather/results/
modules = /home/pi/weather/modules/

[live]
services = ['underground','temperaturnu']
twitter = []
text = []
plot = []

[logged]
services = ['underground']
text = ['6hrs.txt']
plot = []

[hourly]
services = []
text = ['24hrs.txt']
plot = ['tweet.png.xml','24hrs.png.xml','24hrs_full_features.png.xml','rose_24hrs.png.xml']



Joakim Thulin

unread,
Jul 15, 2018, 6:31:00 AM7/15/18
to pywws
Got it fixed by installing requests
sudo pip install requests
As a pywws dependency, shouldn't this be installed together with the pywws package?

Jim Easterbrook

unread,
Jul 15, 2018, 3:14:50 PM7/15/18
to py...@googlegroups.com
Up to a point. The requests package is only used by some of the
"service" modules, so if you're not using those services you don't need
the requests package.

This is the case for several optional packages. I've tried to document
which packages are needed for the various things pywws can do.
http://pywws.readthedocs.io/en/latest/essentials/dependencies.html#weather-service-uploading
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Joakim Thulin

unread,
Jul 15, 2018, 3:19:51 PM7/15/18
to pywws
Stupid me, I didn't read the docs. I fully agree with you Jim. Thanks for the explanation.

Joakim T.
Reply all
Reply to author
Forward
0 new messages