On Saturday, February 17, 2018 at 9:31:33 AM UTC-5, Stefan Gö wrote:
>
> Hi together,
>
> I want to write a new Driver for a Conrad Renkforce C8428 weather station 
> and I try now for a couple of hours to import the weewx.drivers into my 
> python scetch.
> But I get the answer:
>
> *ImportError: No module named 'weewx'*
>
> Can anybody help me* how to Import the weewx modules?*
>

first of all, you must use python2, not python3

assuming that your driver is in the 'user' directory (e.g., 
/home/weewx/bin/user), you should invoke it like this:

PYTHONPATH=/home/weewx/bin python /home/weewx/bin/renkforce3.py

this also assumes that you have a 'main' defined in your driver for easier 
testing and debugging.  

the 'main' should invoke whatever code gets data from the hardware

if you have not defined a 'main', then you can only test by invoking 
weewxd.  that requires a configuration stanza in your weewx configuration 
file such as:

[Renkforce]
    driver = user.renkforce

m 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to