Apologies, I have given you incomplete info. The command provided under the *How to run the driver directly* section requires you to be in the WeeWX root directory (nominally /home/weewx for a setup.py install or /usr/share/weewx for a package install). I thought that was stated in the readme but it seems it is not, it is only stated in the comments <https://github.com/matthewwall/weewx-interceptor/blob/master/bin/user/interceptor.py#L2568> in the actual driver file.
Try cd'ing into /home/weewx or /usr/share/weewx (as applicable) and then execute the command. My preference when running WeeWX drivers directly is to specify the paths in full, eg: $ PYTHONPATH=/home/weewx/bin python /home/weewx/user/driver_file_name.py It's a little more typing, is more specific and requires you to know exactly where things are on your system but it has the advantage of being 'present working directory' agnostic. Gary On Sunday, 13 December 2020 at 02:01:33 UTC+10 [email protected] wrote: > When I try the whole command as root I get (note I will change the flags > after I get it to find the file): > > PYTHONPATH=bin python bin/user/interceptor.py --device=acurite-bridge > --mode=sniff --iface=eth0 --filter="src 192.168.0.4 and dst port 80" > python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file > or directory > > That is why I executed the way I did. Maybe this is what is going on. > Not sure why this does not work. > > Thanks, > > Chris KQ6UP > On 12/11/20 8:29 PM, gjr80 wrote: > > Hi, > > Python needs to know where to find the WeeWX python files. If you have a > look through the interceptor readme > <https://github.com/matthewwall/weewx-interceptor> and scroll down to the > section titled *How to run the driver directly* it tells you what you > need to do. > > Gary > > On Saturday, 12 December 2020 at 14:01:25 UTC+10 Chris Maness wrote: > >> I had wee-wx interceptor running on version 3.8.2, but since upgrading >> to 4.2.0 and upgrading the weewx-interceptor, I cannot get it to work. >> When I run by hand to debug, I get the following error: >> >> /home/pi/weewx-interceptor-master/bin/user# python interceptor.py >> --device=ecowitt-client --mode=sniff --iface=wlan0 --filter="src >> 10.3.141.99 and dst port 80" >> >> Traceback (most recent call last): >> >> File "interceptor.py", line 302, in <module> >> >> import weewx.drivers >> >> ImportError: No module named weewx.drivers >> >> Any suggestions on how to fix this? >> >> Thanks, Chris KQ6UP >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/89cf1d35-dbdd-4fc2-b845-96a3834dd627n%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/89cf1d35-dbdd-4fc2-b845-96a3834dd627n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/19012ab2-4b5f-42d2-b85e-b2b952324fe0n%40googlegroups.com.
