aaahhh! (a light bulb moment) So because I grabbed the latest version of stretch (complete with a later version of pyusb) the later version of pyusb is not compatible with your usb utility, and by assumption and for the same reason the fineoffset usb driver used by weewx also has an issue.
from the jessie version I get pi@weatherpi:~ $ apt list pyusb Listing... Done pi@weatherpi:~ $ apt -h apt 1.0.9.8.4 for armhf compiled on Dec 13 2016 22:26:22 Usage: apt [options] command CLI for apt. Basic commands: list - list packages based on package names search - search in package descriptions show - show package details update - update list of available packages install - install packages remove - remove packages upgrade - upgrade the system by installing/upgrading packages full-upgrade - upgrade the system by removing/installing/upgrading packages edit-sources - edit the source information file pi@weatherpi:~ $ apt search pyusb Sorting... Done Full Text Search... Done python-usb/oldstable,now 0.4.3-1 armhf [installed,automatic] USB interface for Python pi@weatherpi:~ $ and from the stretch version I get pi@weatherpi:~ $ apt search pyusb Sorting... Done Full Text Search... Done pypy-libusb1/stable 1.6.3-1 all Python wrapper for libusb1 (PyPy) python-libusb1/stable 1.6.3-1 all Python wrapper for libusb1 (Python 2) python3-libusb1/stable 1.6.3-1 all Python wrapper for libusb1 (Python 3) python3-usb/stable 1.0.0-1 all USB interface for Python (Python3) pi@weatherpi:~ $ apt list pyusb Listing... Done pi@weatherpi:~ $ Ok ....so I am in way over my head now. I have no idea on how to change from the current pyusb to a older version. I did a "find / -name *us*.py on the stretch version and got back (along with a lot of other stuff) /usr/lib/python2.7/dist-packages/usb/backend/libusb1.py /usr/lib/python2.7/dist-packages/usb/backend/openusb.py /usr/lib/python2.7/dist-packages/usb/backend/libusb0.py these were the only files that had any usb flavor. Would there be any raspberry pi / apt-get gurus willing to give me some guidance on how to find/replace/install an older version python library file over a newer version. Thanks M for your help and patience....... it took me a while before it clicked on what was happening. On Friday, 9 November 2018 22:59:01 UTC+10, mwall wrote: > > > > On Friday, November 9, 2018 at 7:24:29 AM UTC-5, ianprescott10 wrote: >> >> Hi >> >> check the pyusb version on each os. this is due to a difference in the >> pyusb version, not jessie vs stretch. >> >> I am using the same usb utility u wrote to test the 4 port usb hub using >> either stretch or jessie. >> It works on jessie but not on stretch as shown below. (the hardware >> remains the same) >> > > the utility only works with pyusb 0.x, not pyusb 1.x. this is because > pyusb 1.x removed the bus and device numbers. > > > > >> So I am confused now, u mentioned pyusb 1.x, ........ so is this your usb >> utility (later version) or some other code supplied with the os??? and >> how do I check. >> I am only using your usb utility (usb_control-0.6.py) as a test, I rely >> on weewx fousb to do power cycling in the event of a usb lockup. >> The log shows *Nov 6 18:23:36 weatherpi weewx[2689]: fousb: found >> station on USB bus= device=* >> So is this pyusb code issue or weewx fousb issue?? >> > > pyusb is a python library for communicating with usb. you either > installed it as a system package using apt or yum, or you installed it > using pip. or maybe it came with your system. > > if you installed using pip, you can get the version using 'pip freeze': > > pip freeze | grep usb > > if you installed using apt or yum, then use your package manager to figure > out the version. for example: > > rpm -qa | grep usb > > or > > apt list pyusb > > > >> you should be able to run debian9 (stretch) if you install pyusb 0.4 >> So how do I get (stretch version) weewx using fineoffset usb driver to >> use pyusb 0.4 to power cycle a usb port lockup? >> > > you need to install pyusb 0.4 on your system instead of pyusb 1.x. do > this using your system's package manager (apt, yum, etc) if you manage your > python using system packages, or pip if you manage your python separately > from the system packages. > > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
