error installing driver rtl-sdr **zipfile.BadZipfile: File is not a zip file**

29 views
Skip to first unread message

Juan EC7D

unread,
Mar 6, 2020, 4:22:32 AM3/6/20
to weewx-user
wget -O weewx-sdr.zip https://github.com/matthewwall/weewx-sdr/archive/master.zip

pi@meteo:~ $ sudo wee_extension --install weewx-sdr.zip
Request to install 'weewx-sdr.zip'
Extracting from zip archive weewx-sdr.zip
Traceback (most recent call last):
  File "/usr/bin/wee_extension", line 83, in <module>
    main()
  File "/usr/bin/wee_extension", line 75, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 107, in install_extension
    self.tmpdir, self.logger)
  File "/usr/share/weewx/weecfg/__init__.py", line 1212, in extract_zip
    zip_archive = zipfile.ZipFile(open(filename, mode='r'))
  File "/usr/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file



Hello, I am installing rtl-sdr on weewx and when I try to install the driver, I have an error, it reports that the zip file is bad. can you help me, thanks.

gjr80

unread,
Mar 6, 2020, 5:08:49 AM3/6/20
to weewx-user
Hi,

Those exact commands worked fine for me just now. I suggest you delete the old .zip file and try downloading the .zip file again, it looks like it was corrupted somewhere between github and your computer.

Gary

Juan EC7D

unread,
Mar 6, 2020, 6:25:50 AM3/6/20
to weewx-user

I have tried it again and it continues to give the same problem. I have downloaded the file directly and executed it

pi@meteo:~ $ sudo wee_extension --install weewx-sdr-master.zip

but now this error appears when executing it
pi@meteo:~ $ sudo wee_config --reconfigure --driver=user.sdr --no-prompt
Using configuration file /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/bin/wee_config", line 115, in <module>
    main()
  File "/usr/bin/wee_config", line 110, in main
    config_mgr.run(args, options)
  File "/usr/share/weewx/weecfg/config.py", line 102, in run
    self.modify_config(config_dict, options)
  File "/usr/share/weewx/weecfg/config.py", line 120, in modify_config
    stn_info = self.get_stn_info(config_dict, options)
  File "/usr/share/weewx/weecfg/config.py", line 129, in get_stn_info
    stn_info = weecfg.get_station_info(config_dict)
  File "/usr/share/weewx/weecfg/__init__.py", line 788, in get_station_info
    stn_info['driver'] = config_dict[stn_info['station_type']]['driver']
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'driver'

Now where can the error be?
Reply all
Reply to author
Forward
0 new messages