Closed jsikorsky closed 4 years ago
Thanks! will find an alternative... Does it crash? ;(
Of course not, it just does not work without this simple fix.
Jurij
po 18. 2. 2019 v 20:09 odesílatel Volodymyr Shymanskyy < notifications@github.com> napsal:
Does it crash? ;(
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vshymanskyy/blynk-library-python/issues/27#issuecomment-464846404, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgh9xUGzdEpSyKB54KG6UXiyh_6mZMeks5vOvpfgaJpZM4bBbjt .
Well, in wider context it actually does crash - AttributeError
is thrown upon import.
Traceback (most recent call last):
File "C:/Users/jurij/Documents/waveforms/python/blynk_test2.py", line 2, in <module>
from BlynkLib import Blynk
File "C:\Users\jurij\Documents\waveforms\python\BlynkLib\__init__.py", line 1, in <module>
from .BlynkLib import Blynk
File "C:\Users\jurij\Documents\waveforms\python\BlynkLib\BlynkLib.py", line 50, in <module>
/___/ for Python v""" + _VERSION + " (" + os.uname()[1] + ")\n")
AttributeError: module 'os' has no attribute 'uname'
Regards,
Jurij
OK thanks, will fix asap
On Mon, Feb 18, 2019, 10:03 PM jsikorsky <notifications@github.com wrote:
Well, in wider context it actually does crash - AttributeError is thrown upon import.
Traceback (most recent call last): File "C:/Users/jurij/Documents/waveforms/python/blynk_test2.py", line 2, in
from BlynkLib import Blynk File "C:\Users\jurij\Documents\waveforms\python\BlynkLib_init.py", line 1, in from .BlynkLib import Blynk File "C:\Users\jurij\Documents\waveforms\python\BlynkLib\BlynkLib.py", line 50, in / for Python v""" + _VERSION + " (" + os.uname()[1] + ")\n") AttributeError: module 'os' has no attribute 'uname'/ Regards,
Jurij
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vshymanskyy/blynk-library-python/issues/27#issuecomment-464859940, or mute the thread https://github.com/notifications/unsubscribe-auth/ABb9lFHzDxZfcKjF_YYMm9J-_UVXkbTZks5vOwcvgaJpZM4bBbjt .
propose fix #33
Use platform.uname() instead of os.uname().
i just proposed a fix at PR #42
This issue should be closed since PR #33 is merged.
os.uname()
function is not supported on Windows platform (I use it for development). Since it's used only in banner upon library load, it's not crucial IMO and can be replaced bysys.platform
, or omitted altogether.Jurij