When you start WeeWX after your upgrade what version of python is it run 
under? python 2 or python 3? You will find this in the startup portion of 
the log when starting WeeWX. Assuming you installed the dependencies for 
this version of python you will need to specify the version of python used 
when running the interceptor directly. If WeeWX is being run under python2 
replace *python* in the above command with *python2*, if WeeWX is being run 
under python3 replace *python* in the above command with *python3*.

Gary

On Sunday, 13 December 2020 at 09:38:29 UTC+10 [email protected] wrote:

> It got one line further, lol:
>
> root@raspberrypi:/usr/share/weewx# PYTHONPATH=/usr/share/weewx python 
> /usr/share/weewx/user/interceptor.py  --device=acurite-bridge --mode=sniff 
> --iface=wlan0 --filter="src 10.3.141.99 and dst port 80"
>
>
> Traceback (most recent call last):
>
>   File "/usr/share/weewx/user/interceptor.py", line 303, in <module>
>     import weeutil.weeutil
>   File "/usr/share/weewx/weeutil/weeutil.py", line 26, in <module>
>     from weeutil.config import accumulateLeaves, search_up
>   File "/usr/share/weewx/weeutil/config.py", line 11, in <module>
>     import configobj
> ImportError: No module named configobj
> On 12/12/20 3:34 PM, gjr80 wrote:
>
> try
>
> $ PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py 
> .....
>
> Gary
>
> On Sunday, 13 December 2020 at 09:23:56 UTC+10 [email protected] 
> wrote:
>
>> There is no "bin" directory in /home/weewx or /usr/share/weewx.  I don't 
>> have a /home/weewx directory, but I do /usr/share/weewx directory.
>>
>> I have "tree'd" the weewx folder.  
>>
>> weewx/
>> ├── daemon.py
>> ├── __pycache__
>> │   ├── daemon.cpython-37.pyc
>> │   └── six.cpython-37.pyc
>> ├── schemas
>> │   ├── __init__.py
>> │   ├── __pycache__
>> │   │   ├── __init__.cpython-37.pyc
>> │   │   └── wview_extended.cpython-37.pyc
>> │   ├── wview_extended.py
>> │   └── wview.py
>> ├── six.py
>> ├── user
>> │   ├── extensions.py
>> │   ├── __init__.py
>> │   ├── installer
>> │   │   └── interceptor
>> │   │       └── install.py
>> │   ├── interceptor.py
>> │   └── __pycache__
>> │       ├── extensions.cpython-37.pyc
>> │       ├── __init__.cpython-37.pyc
>> │       └── interceptor.cpython-37.pyc
>> ├── weecfg
>> │   ├── config.py
>> │   ├── database.py
>> │   ├── extension.py
>> │   ├── __init__.py
>> │   └── __pycache__
>> │       ├── config.cpython-37.pyc
>> │       ├── extension.cpython-37.pyc
>> │       └── __init__.cpython-37.pyc
>> ├── wee_config
>> ├── wee_database
>> ├── weedb
>> │   ├── __init__.py
>> │   ├── mysql.py
>> │   ├── __pycache__
>> │   │   ├── __init__.cpython-37.pyc
>> │   │   └── sqlite.cpython-37.pyc
>> │   └── sqlite.py
>> ├── wee_debug
>> ├── wee_device
>> ├── wee_extension
>> ├── wee_import
>> ├── weeimport
>> │   ├── csvimport.py
>> │   ├── cumulusimport.py
>> │   ├── __init__.py
>> │   ├── wdimport.py
>> │   ├── weathercatimport.py
>> │   ├── weeimport.py
>> │   └── wuimport.py
>> ├── weeplot
>> │   ├── genplot.py
>> │   ├── __init__.py
>> │   ├── __pycache__
>> │   │   ├── genplot.cpython-37.pyc
>> │   │   ├── __init__.cpython-37.pyc
>> │   │   └── utilities.cpython-37.pyc
>> │   └── utilities.py
>> ├── wee_reports
>> ├── weeutil
>> │   ├── config.py
>> │   ├── ftpupload.py
>> │   ├── __init__.py
>> │   ├── logger.py
>> │   ├── log.py
>> │   ├── Moon.py
>> │   ├── __pycache__
>> │   │   ├── config.cpython-37.pyc
>> │   │   ├── __init__.cpython-37.pyc
>> │   │   ├── logger.cpython-37.pyc
>> │   │   ├── Moon.cpython-37.pyc
>> │   │   ├── Sun.cpython-37.pyc
>> │   │   └── weeutil.cpython-37.pyc
>> │   ├── rsyncupload.py
>> │   ├── Sun.py
>> │   ├── timediff.py
>> │   └── weeutil.py
>> ├── weewx
>> │   ├── accum.py
>> │   ├── almanac.py
>> │   ├── cheetahgenerator.py
>> │   ├── crc16.py
>> │   ├── defaults.py
>> │   ├── drivers
>> │   │   ├── acurite.py
>> │   │   ├── cc3000.py
>> │   │   ├── fousb.py
>> │   │   ├── __init__.py
>> │   │   ├── __pycache__
>> │   │   │   ├── __init__.cpython-37.pyc
>> │   │   │   └── simulator.cpython-37.pyc
>> │   │   ├── simulator.py
>> │   │   ├── te923.py
>> │   │   ├── ultimeter.py
>> │   │   ├── vantage.py
>> │   │   ├── wmr100.py
>> │   │   ├── wmr200.py
>> │   │   ├── wmr300.py
>> │   │   ├── wmr9x8.py
>> │   │   ├── ws1.py
>> │   │   ├── ws23xx.py
>> │   │   └── ws28xx.py
>> │   ├── engine.py
>> │   ├── filegenerator.py
>> │   ├── imagegenerator.py
>> │   ├── __init__.py
>> │   ├── manager.py
>> │   ├── __pycache__
>> │   │   ├── accum.cpython-37.pyc
>> │   │   ├── almanac.cpython-37.pyc
>> │   │   ├── cheetahgenerator.cpython-37.pyc
>> │   │   ├── defaults.cpython-37.pyc
>> │   │   ├── engine.cpython-37.pyc
>> │   │   ├── imagegenerator.cpython-37.pyc
>> │   │   ├── __init__.cpython-37.pyc
>> │   │   ├── manager.cpython-37.pyc
>> │   │   ├── qc.cpython-37.pyc
>> │   │   ├── reportengine.cpython-37.pyc
>> │   │   ├── restx.cpython-37.pyc
>> │   │   ├── station.cpython-37.pyc
>> │   │   ├── tags.cpython-37.pyc
>> │   │   ├── units.cpython-37.pyc
>> │   │   ├── uwxutils.cpython-37.pyc
>> │   │   ├── wxformulas.cpython-37.pyc
>> │   │   ├── wxservices.cpython-37.pyc
>> │   │   ├── wxxtypes.cpython-37.pyc
>> │   │   └── xtypes.cpython-37.pyc
>> │   ├── qc.py
>> │   ├── reportengine.py
>> │   ├── restx.py
>> │   ├── station.py
>> │   ├── tags.py
>> │   ├── units.py
>> │   ├── uwxutils.py
>> │   ├── wxengine.py
>> │   ├── wxformulas.py
>> │   ├── wxmanager.py
>> │   ├── wxservices.py
>> │   ├── wxxtypes.py
>> │   └── xtypes.py
>> ├── weewxd
>> └── wunderfixer
>> On 12/12/20 2:48 PM, gjr80 wrote:
>>
>> 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
>>  
>> <https://groups.google.com/d/msgid/weewx-user/19012ab2-4b5f-42d2-b85e-b2b952324fe0n%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/66751660-e8af-4614-888e-1c616cf05150n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/66751660-e8af-4614-888e-1c616cf05150n%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/9b398246-6866-46d5-b96b-eb82fe294185n%40googlegroups.com.

Reply via email to