You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I successfully connected to my miband 4 using program:
python miband4_console.py -m XXXX -k XXXX
I then navigate on my miband to the music menu
and if I then select the first item Get general info of the device from the curses menu it is reporting below error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 133, in _wrap_start
curses.wrapper(self._main_loop)
File "/usr/local/lib/python3.9/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 193, in _main_loop
self.process_user_input()
File "/usr/local/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 289, in process_user_input
self.select()
File "/usr/local/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 329, in select
self.selected_item.action()
File "/usr/local/lib/python3.9/site-packages/cursesmenu/items/function_item.py", line 35, in action
self.return_value = self.function(*self.args, **self.kwargs)
File "/miband4/miband4_console.py", line 91, in general_info
print ('Soft revision:',band.get_revision())
File "/miband4/miband.py", line 380, in get_revision
svc = self.getServiceByUUID(UUIDS.SERVICE_DEVICE_INFO)
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 488, in getServiceByUUID
rsp = self._getResp('find')
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 416, in _getResp
self.delegate.handleNotification(hnd, data)
File "/miband4/miband.py", line 111, in handleNotification
self.device.setMusic()
File "/miband4/miband.py", line 666, in setMusic
if self.artist is not None:
AttributeError: 'miband' object has no attribute 'artist'
Exception ignored in: <function Peripheral.__del__ at 0x7679a658>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 630, in __del__
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 454, in disconnect
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 407, in _getResp
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 375, in _waitResp
bluepy.btle.BTLEInternalError: Unexpected response (find)
root@pi3two:/miband4#
The text was updated successfully, but these errors were encountered:
call setTrack(MUSICSTATE.PAUSED) during initialization of the miband this will set all the music attributes so it won't report an AttibuteError anymore.
So I added line 184 (= self.setTrack(MUSICSTATE.PAUSED)) in miband.py which fixed the problem
I successfully connected to my miband 4 using program:
I then navigate on my miband to the music menu
and if I then select the first item
Get general info of the device
from the curses menu it is reporting below error:The text was updated successfully, but these errors were encountered: