Weewx fails to load - ImportError: No module named fileparse

49 views
Skip to first unread message

Ron Walker

unread,
Jun 18, 2019, 12:42:44 PM6/18/19
to weewx-user
I am new to weewx and I installed using the Debian method.  I am trying to use Weewx with a DIY weather station.  Station is sending data to a file and I am using fileparse to retrieve the data.  I am attempting to load weewx manually to test data import.

My fileparse.py file is located in the weewx/bin/user directory.  My weewx.conf has a station type of 'fileparse'.  In the Simulator section of the weewx.conf, the driver is identified as 'fileparse'.  I also have a stanza in the weewx.conf called [fileparse] with the same driver info.  Can someone help me to understand where the issue is located?

When I try to start weewx it fails with the following:

pi@WeatherPi:/etc/weewx $ sudo weewxd weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 884, in main
    engine = engine_class(config_dict)
  File "/usr/share/weewx/weewx/engine.py", line 72, in __init__
    self.setupStation(config_dict)
  File "/usr/share/weewx/weewx/engine.py", line 96, in setupStation
    __import__(driver)
ImportError: No module named fileparse

My weewx.conf has the following relevant lines:

[Station]
       # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = fileparse

[Simulator]
    # This section is for the weewx weather station simulator

    # The time (in seconds) between LOOP packets.
    loop_interval = 2.5

    # The simulator mode can be either 'simulator' or 'generator'.
    # Real-time simulator. Sleep between each LOOP packet.
    #mode = simulator
    # Generator.  Emit LOOP packets as fast as possible (useful for testing).
    mode = generator

    # The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default
    # is to use the present time.
    #start = 2011-01-01T00:00

    # The driver to use:
    #driver = user.fileparse

[fileparse]
        poll_interval = 10
        path = /var/tmp/datafile
        driver = user.fileparse


mwall

unread,
Jun 18, 2019, 3:06:46 PM6/18/19
to weewx-user
On Tuesday, June 18, 2019 at 12:42:44 PM UTC-4, Ron Walker wrote:

My fileparse.py file is located in the weewx/bin/user directory. 

for an install from .deb or apt, the fileparse.py must be in /usr/share/weewx/user

m

Ron Walker

unread,
Jun 18, 2019, 3:52:47 PM6/18/19
to weewx-user
Thank you!  Went back and re-did the fileparse install and it worked correctly!
Reply all
Reply to author
Forward
0 new messages