radinsky / broadlink-http-rest

Broadlink RM/RM2/RM Pro/RM3/BlackBean/A1 Web server with REST API (like..)
MIT License
156 stars 47 forks source link

NameError: name 'GlobalPassword' is not defined #35

Open marcodesantis71 opened 3 years ago

marcodesantis71 commented 3 years ago

Hi,

I have migrate from Ubuntu 16.04 to Ubuntu 20.04 and now it doesn't work.

When I try to learn command I receive this error:

Exception happened during processing of request from ('192.168.123.14', 59197) Traceback (most recent call last): File "server.py", line 51, in do_GET if GlobalPassword: NameError: name 'GlobalPassword' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.8/socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python3.8/socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.8/socketserver.py", line 720, in init self.handle() File "server.py", line 44, in handle self.handle_one_request() File "/usr/lib/python3.8/http/server.py", line 415, in handle_one_request method() File "server.py", line 60, in do_GET self.messageHandler() File "server.py", line 121, in messageHandler result = learnCommand(commandName,deviceName) File "server.py", line 302, in learnCommand deviceKey = device.key AttributeError: 'rm' object has no attribute 'key'

Where is the problem?

radinsky commented 3 years ago

I would suggest trying previous version before password was introduced: checkout on 4cd34e9c016ee1928bfd235ee4631e544271c8f7