Closed bodagetta closed 2 years ago
Please edit your report and format the code with https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code
Done - sorry about that!
I can not manage to repeat it here - with python 3.6 it works fine. However, I notice something fishy in auth.py - two incompatible ways of import. Maybe python 3.8 is more picky with such things.
@bodagetta , please try to remove line 31 in auth.py, which reads from xled.security import generate_challenge
, and then try again to see if the problem persists.
@Anders-Holst I tried commenting out line 31 from auth.py as requested and it is then missing that import.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michael.whitley/Developer/xled/xled/control.py", line 226, in get_device_info
response = self.session.get(url)
File "/Users/michael.whitley/Developer/xled/xled/control.py", line 77, in session
self._session = BaseUrlChallengeResponseAuthSession(
File "/Users/michael.whitley/Developer/xled/xled/auth.py", line 219, in __init__
self.client = client or ClientApplication()
File "/Users/michael.whitley/Developer/xled/xled/auth.py", line 415, in __init__
self.challenge = challenge or generate_challenge
NameError: name 'generate_challenge' is not defined```
Ah, I see. Then on line 415 where it says self.challenge = challenge or generate_challenge
, can you add xled.security.
before generate_challenge, so it says: self.challenge = challenge or xled.security.generate_challenge
. And try again.
sorry for delay - Thanksgiving happened.
I tried that change and it works - it returns 400.
Thanks!
I'm closing this as from previous comment it looks like not a bug.
Summary
I'm running the sample code and get the following error
Firmware version
Operating system
MacOS
Python version
Python 3.8.5
Steps to reproduce
Expected behavior
Return number of LEDs
Actual results