bitrate16 / peripage-python

Python module and documentation for direct printing on Peripage thermal printers via bluetooth
GNU General Public License v3.0
80 stars 10 forks source link

AttributeError: 'super' object has no attribute 'init' #15

Open murphy2712 opened 1 year ago

murphy2712 commented 1 year ago

Hi, I installed the updated repo (from ppa6 naming which was printing fine a couple months ago) and executed the requirement installs, but executing the peripage.py command now gives me this error:

$ python3 peripage.py -m myprinteradress -p A6p -t test
Traceback (most recent call last):
  File "/Users/xxx/Personal/peripage-python-main/peripage.py", line 10, in <module>
    main()
  File "/Users/xxx/Personal/peripage-python-main/peripage/__main__.py", line 76, in main
    printer.connect()
  File "/Users/xxx/Personal/peripage-python-main/peripage/__init__.py", line 156, in connect
    self.sock.connect((self.mac, 1))
  File "/opt/homebrew/lib/python3.11/site-packages/bluetooth/macos.py", line 119, in connect
    return self._sock.connect(addrport)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/lightblue/_bluetoothsockets.py", line 348, in connect
    self.__eventlistener = self.__createlistener()
                           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/lightblue/_bluetoothsockets.py", line 642, in __createlistener
    listener = _ChannelEventListener.alloc().initWithDelegate_(self)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/lightblue/_bluetoothsockets.py", line 787, in initWithDelegate_
    self = super().init()
           ^^^^^^^^^^^^
AttributeError: 'super' object has no attribute 'init'
sys:1: UninitializedDeallocWarning: leaking an uninitialized object of type _ChannelEventListener

I'm running on a Mac M1 with Ventura 13.3.1. Thanks for the help.

kkogggokk commented 1 year ago

MacOS : 12.6.7 Python : 3.10.11 I installed it through pip install peripage But I have a similar issue.

스크린샷 2023-06-25 오전 2 22 22
bitrate16 commented 1 year ago

@murphy2712 @kkogggokk have you tried to install latest bluez library from original repo? https://github.com/pybluez/pybluez

pip install git+https://github.com/pybluez/pybluez@master#egg=pybluez --user

I currently can not test it without hardware