question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There is message error in the log: kms | Thu, 16 Sep 2021 05:17:00 WARNING Module 'tzlocal' not available ! Request time not localized. Here is the code triggering the warning pykms_Base L123: from pytz.exceptions import UnknownTimeZoneError L131: except ImportError: …

Adding the pytz package (pip3 install pytz), whatever is the timezone, I have that error. I can’t see why it is related.ere Is there any reason ?

kms       | Traceback (most recent call last):
kms       |   File "pykms_Client.py", line 364, in <module>
kms       |     clt_main(with_gui = False)
kms       |   File "pykms_Client.py", line 280, in clt_main
kms       |     client_create(clt_sock)
kms       |   File "pykms_Client.py", line 240, in client_create
kms       |     parsed = MSRPCRespHeader(response)
kms       |   File "/home/py-kms/pykms_Dcerpc.py", line 641, in __init__
kms       |     MSRPCHeader.__init__(self, aBuffer, alignment)
kms       |   File "/home/py-kms/pykms_Dcerpc.py", line 588, in __init__
kms       |     Structure.__init__(self,data, alignment)
kms       |   File "/home/py-kms/pykms_Structure.py", line 117, in __init__
kms       |     self.fromString(data)
kms       |   File "/home/py-kms/pykms_Structure.py", line 174, in fromString
kms       |     self[field[0]] = self.unpack(field[1], data[:size], dataClassOrCode=dataClassOrCode, field=field[0])
kms       |   File "/home/py-kms/pykms_Structure.py", line 336, in unpack
kms       |     return self.unpack(two[0], data)
kms       |   File "/home/py-kms/pykms_Structure.py", line 392, in unpack
kms       |     return unpack(format, b(data))[0]
kms       | struct.error: ('unpack requires a buffer of 1 bytes', "When unpacking field 'ver_major | B=5 | ''[:1]'")

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
edgd1ercommented, Oct 13, 2021

😃 I’m already on the next point, no tz defined in python possibly… still investigating. thanks to the nice logs, it should be easy to pinpoint.

1reaction
Matthew-Beckettcommented, Oct 13, 2021

Apologies this is my fault, I will PR a fix ASAP. In the meantime, please back date to the previous version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pandas import error: missing "pytz". But works fine in console
+1, but in anaconda. pandas doesn't load if python is called in the command line. But it works fine inside spyder. Environment is...
Read more >
[Fixed] ModuleNotFoundError: No module named 'pytz' - Finxter
Solution Idea 1: Install Library pytz. The most likely reason is that Python doesn't provide pytz in its standard library. You need to...
Read more >
ModuleNotFoundError: No module named 'pytz' in Python
The Python ModuleNotFoundError: No module named 'pytz' occurs when we forget to install the `pytz` module before importing it or install it in...
Read more >
ImportError: Missing required dependencies ['numpy', 'pytz ...
I have installed numpy and pytz packages through
Read more >
pytz.timezone concept, missing something in my code (Example ...
Create a function named to_timezone that takes a timezone name as a string. Convert starter to that timezone using pytz's timezones and return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found