Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'l2cat' #11

Closed
leixyou opened this issue May 4, 2021 · 4 comments
Closed

ModuleNotFoundError: No module named 'l2cat' #11

leixyou opened this issue May 4, 2021 · 4 comments
Labels
bug Something isn't working fixed

Comments

@leixyou
Copy link

leixyou commented May 4, 2021

Traceback (most recent call last):
File "/home/ubuntu/bluetooth/pybluescan/bin/bluescan", line 5, in
from bluescan.main import main
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/bluescan/main.py", line 17, in
from .ui import parse_cmdline
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/bluescan/ui.py", line 56, in
from btgatt import service_names, charac_names, descriptor_names
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/btgatt/init.py", line 6, in
from btatt import Attribute
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/btatt/init.py", line 7, in
from l2cat.l2cap_client import L2CAPClient
ModuleNotFoundError: No module named 'l2cat'

There is no l2cat library can be installed.

I noted that the btatt library was updated on April 30.
Maybe due to the btatt library update?

@fO-000
Copy link
Owner

fO-000 commented May 5, 2021

Thank you for opening this issue.

This problem is because I imported l2cat into btatt prematurely. btatt and bluescan currently do not need l2cat.

I have released the new version 0.0.2 for btatt with l2cat commented out.
Try this version to see if the problem can be solved.

@fO-000 fO-000 added bug Something isn't working wait for response labels May 5, 2021
@leixyou
Copy link
Author

leixyou commented May 6, 2021

bluescan version 0.6.3
btatt version 0.0.2
bluescan -h
Traceback (most recent call last):
File "/home/ubuntu/bluetooth/pybluescan/bin/bluescan", line 5, in
from bluescan.main import main
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/bluescan/main.py", line 19, in
from .br_scan import BRScanner
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/bluescan/br_scan.py", line 31, in
from .common import bdaddr_to_company_name
File "/home/ubuntu/bluetooth/pybluescan/lib/python3.6/site-packages/bluescan/common.py", line 28, in
company_id = items[0].removesuffix(' (hex)')
AttributeError: 'str' object has no attribute 'removesuffix'

Still exist above error when i run bluescan.

@fO-000
Copy link
Owner

fO-000 commented May 7, 2021

The removesuffix() is new in Python3.9. However, you used python3.6.

Please upgrade your python or use a lower version bluescan.

@wiggigemc489
Copy link

hey, im having the same problem trying to run bluescan, i had issues with building pybluez but managed fixing them and now after i finally managed to install blue scan i only get this output:
Traceback (most recent call last):
File "/home/wiggige/.local/bin/bluescan", line 5, in
from bluescan.main import main
File "/home/wiggige/.local/lib/python3.8/site-packages/bluescan/main.py", line 19, in
from .br_scan import BRScanner
File "/home/wiggige/.local/lib/python3.8/site-packages/bluescan/br_scan.py", line 31, in
from .common import bdaddr_to_company_name
File "/home/wiggige/.local/lib/python3.8/site-packages/bluescan/common.py", line 28, in
company_id = items[0].removesuffix(' (hex)')
AttributeError: 'str' object has no attribute 'removesuffix'

tried installing also python3.9 but seems like my python is up to date. any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

3 participants