bordaigorl / rmview

A live viewer for reMarkable written in PyQt5
GNU General Public License v3.0
755 stars 63 forks source link

module 'jwt' has no attribute 'decode' #105

Closed gustaphe closed 2 years ago

gustaphe commented 2 years ago

After the latest time I updated the ReMarkable 2 (2.10.1.332), I could only see the pen trace, no ink. So I reinstalled rmview (for good measure) via yay. Now, when launching rmview, i get a seemingly infinite loop of unhandled errors:

[WARNING] Authenticating, please wait...
[INFO] received timestamp challenge 1633681386801
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/twisted/python/log.py", line 85, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python3.9/site-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3.9/site-packages/twisted/python/context.py", line 83, in callWithContext
    return func(*args, **kw)
  File "/usr/lib/python3.9/site-packages/twisted/internet/posixbase.py", line 686, in _doReadOrWrite
    why = selectable.doRead()
--- <exception caught here> ---
  File "/usr/lib/python3.9/site-packages/twisted/internet/udp.py", line 254, in doRead
    self.protocol.datagramReceived(data, addr)
  File "/usr/lib/python3.9/site-packages/rmview/screenstream/screenshare.py", line 46, in datagramReceived
    if not self.callback(timestamp):
  File "/usr/lib/python3.9/site-packages/rmview/screenstream/screenshare.py", line 119, in runVnc
    userId = self.get_userid()
  File "/usr/lib/python3.9/site-packages/rmview/screenstream/screenshare.py", line 107, in get_userid
    d = jwt.decode(token, options={"verify_signature": False})
builtins.AttributeError: module 'jwt' has no attribute 'decode'

The same message repeats every second or so, until I close the window.

Did I mess something up?

bordaigorl commented 2 years ago

I assume you fetched the latest version of rmview from the vnc branch. It looks like you have the wrong jwt package installed. The correct one is this one and NOT THIS ONE. Installing rmview trough pip should install the right dependencies.

gustaphe commented 2 years ago

Yep, that solved it. I don't know python, so that was kind of bound to happen.

When installing through yay that's the community/python-pyjwt package. I'll make a request that's added as a dependency in aur.

Thanks!