Can you provide the console output from when you installed pypcap? Under 
some circumstances pip installs locally in a directory that is not in the 
path when python is run. If you can't uninstall using:

$ sudo pip3 uninstall pypcap

and then install again and capture and post the console output.

Gary
On Sunday, 13 December 2020 at 12:04:38 UTC+10 [email protected] wrote:

> Done, same error.
> On 12/12/20 5:56 PM, gjr80 wrote:
>
> I believe that installing via apt makes pcap available under python2 only. 
> Try installing pypcap using pip3:
>
> $ sudo pip3 install pypcap
>
> Note that you may need ot install pip3 if not already installed:
>
> $ sudo apt-get install python3-pip
>
> Gary
>
> On Sunday, 13 December 2020 at 11:38:58 UTC+10 [email protected] 
> wrote:
>
>> Ok, got a little further.
>>
>> Dec 12 17:04:24 raspberrypi weewx[18797] INFO __main__: Using Python 
>> 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
>>
>> root@raspberrypi:/home/pi# PYTHONPATH=/usr/share/weewx python3.7 
>> /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 2664, in <module>
>>     address=options.addr, port=options.port)
>>   File "/usr/share/weewx/user/interceptor.py", line 1002, in __init__
>>     AcuriteBridge.Parser(), handler=AcuriteBridge.Handler, **stn_dict)
>>   File "/usr/share/weewx/user/interceptor.py", line 427, in __init__
>>     iface, pcap_filter, promiscuous)
>>   File "/usr/share/weewx/user/interceptor.py", line 465, in __init__
>>     import pcap
>> ModuleNotFoundError: No module named 'pcap'
>>
>> @@@@@I have this installed, but I guess it is not finding it:@@@@@@
>>
>> root@raspberrypi:/home/pi# sudo apt-get install python-libpcap
>> Reading package lists... Done
>> Building dependency tree       
>> Reading state information... Done
>> python-libpcap is already the newest version (0.6.4-1).
>> The following packages were automatically installed and are no longer 
>> required:
>>   lxplug-volume openbsd-inetd tcpd
>> Use 'sudo apt autoremove' to remove them.
>> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>>
>> Thanks,
>>
>> Chris KQ6UP
>>
>>
>> On 12/12/20 4:43 PM, gjr80 wrote:
>>
>> 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
>>  
>> <https://groups.google.com/d/msgid/weewx-user/9b398246-6866-46d5-b96b-eb82fe294185n%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/14f28ca7-b305-4d90-a15c-9e2dd4a3b470n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/14f28ca7-b305-4d90-a15c-9e2dd4a3b470n%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/419a5e8a-65b5-4234-815f-12dcd2438b56n%40googlegroups.com.

Reply via email to