darrylb123 / usbrelay

Control usb relay - based on hidapi
GNU General Public License v2.0
315 stars 98 forks source link

Module usbrelay_py has no attribute 'board_control' #81

Closed joshuar87 closed 2 years ago

joshuar87 commented 2 years ago

Hi,

usbrelay seems to be installed in ubuntu (mint) fine. It imports ok into python but none of the attributes seem to be there. I ran make and install for python.

In the meantime going to use a workaround: import os os.system("usbrelay...

caveman2st commented 2 years ago

i have the same issues:

>>> import usbrelay_py
>>> dir(usbrelay_py)
['__author__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__']
darrylb123 commented 2 years ago

I can confirm the error on Linux Mint 20.3 I am neither a python developer nor a ubuntu/debian user so I am in the dark here. The issue is not on Fedora so it must be solvable. I will need to find someone that can help.

darrylb123 commented 2 years ago

Ok, I have no idea what changed, but in the process of preparing usbrelay to become a Fedora package the python build system was changed over to the modern method. I tested the build using the new code and it works file. I did have to make a change to the Makefile so you will need the absolute latest. To try it, pull a fresh version from github (git pull) then check out the new branch. $ git checkout python_wheel

There is an updated README and additional packages for python package building will need to be installed. sudo apt install libpython3-dev python3-venv pip sudo pip install build

You may also need to delete the usbrelay packages installed under /usr/local/lib/python3.X/site-packages before installing

Keep a record of anything different from the doco you had to do and I will update the docs. I'm very unfamiliar with a debian environment.

joshuar87 commented 2 years ago

Thanks a lot for the prompt reply will give it a try soon!

caveman2st commented 2 years ago

Now it works for me on Debian. Thank You

python library built and install works different: cd usbrelay_py make

darrylb123 commented 2 years ago

Yes, the new release coming builds a python wheel package.

On Thu, 17 Mar 2022, 6:42 pm caveman2st, @.***> wrote:

Now it works for me on Debian. Thank You

python library built and install works different: cd usbrelay_py make

— Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/81#issuecomment-1070542119, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSUVJ5AWSAKTIQ257MB7TVALV73ANCNFSM5QJNTVBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>