Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Import loguru (error un time.struct_time) #33

Closed
heliomcp opened this issue Jan 12, 2019 · 2 comments
Closed

Can't Import loguru (error un time.struct_time) #33

heliomcp opened this issue Jan 12, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@heliomcp
Copy link

$ python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from loguru import logger
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\Python35-32\lib\site-packages\loguru\__init__.py", line 10, in <module>
    from ._logger import Logger as _Logger
  File "C:\Program Files (x86)\Python35-32\lib\site-packages\loguru\_logger.py", line 30, in <module>
    start_time = now()
  File "C:\Program Files (x86)\Python35-32\lib\site-packages\loguru\_datetime.py", line 78, in now
    tzinfo = timezone(timedelta(seconds=local.tm_gmtoff), local.tm_zone)
AttributeError: 'time.struct_time' object has no attribute 'tm_gmtoff'
@Delgan
Copy link
Owner

Delgan commented Jan 12, 2019

Oh, thanks for the report!

I did not realize that tm_gmtoff was missing on some platform prior to Python 3.6, this is explicitly stated in the documentation.

I will try to find a workaround and fix it as soon as possible.

@Delgan
Copy link
Owner

Delgan commented Jan 19, 2019

Fixed and will be available in the next v0.2.5 release, thanks again. 👍

@Delgan Delgan closed this as completed Jan 19, 2019
@Delgan Delgan added the bug Something isn't working label Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants