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.

'Europe/Berlin' object has no attribute 'key'

See original GitHub issue

On git bc9d9034aa7d83c12e24c60aac50c965513ef9ae

$ scripts/promnesia index
[ERROR   2021-09-22 16:02:49 promnesia common.py:493] 'Europe/Berlin' object has no attribute 'key'
    Traceback (most recent call last):
      File "/home/hrehfeld/projects/ext/promnesia/src/promnesia/common.py", line 491, in get_system_zone
        return tzlocal.get_localzone().key # type: ignore[attr-defined] # mypy stubs aren't aware of api change yet (see https://github.com/python/typeshed/issues/6038)
    AttributeError: 'Europe/Berlin' object has no attribute 'key'
[ERROR   2021-09-22 16:02:49 promnesia common.py:494] Couldn't determine system timezone. Falling back to UTC. Please report this as a bug!

Just updated from git to bc9d9034aa7d83c12e24c60aac50c965513ef9ae

It seems that tzlocal is somehow outdated?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
krillin666commented, Oct 19, 2021

Hi! Did you only do git pull? You need tzlocal version 3.0 now, you can upgrade via pip3 install --user -U tzlocal

/code/promnesia ✔ ❯ python3 -c 'import promnesia.common as C; print(C.get_system_zone())'                                                                                                                                                         mc 23:06:48
Europe/London
/code/promnesia ✔ ❯ pip3 show tzlocal                                                                                                                                                                                                             mc 23:06:50
Name: tzlocal
Version: 3.0
Summary: tzinfo object for the local timezone
Home-page: UNKNOWN
Author: Lennart Regebro
Author-email: regebro@gmail.com
License: MIT
Location: /home/karlicos/.local/lib/python3.8/site-packages
Requires: backports.zoneinfo
Required-by: promnesia

This worked for me, so I think you can close this 👍

1reaction
karlicosscommented, Sep 22, 2021

Hi! Did you only do git pull? You need tzlocal version 3.0 now, you can upgrade via pip3 install --user -U tzlocal

/code/promnesia ✔ ❯ python3 -c 'import promnesia.common as C; print(C.get_system_zone())'                                                                                                                                                         mc 23:06:48
Europe/London
/code/promnesia ✔ ❯ pip3 show tzlocal                                                                                                                                                                                                             mc 23:06:50
Name: tzlocal
Version: 3.0
Summary: tzinfo object for the local timezone
Home-page: UNKNOWN
Author: Lennart Regebro
Author-email: regebro@gmail.com
License: MIT
Location: /home/karlicos/.local/lib/python3.8/site-packages
Requires: backports.zoneinfo
Required-by: promnesia
Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'Event' object has no attribute 'key'
I get the error message below when I run my code. Traceback (most recent call last): File "C:/Users/user/PycharmProjects/MyDevWork/ ...
Read more >
'AnsibleSequence' object has no attribute 'keys' #22671 - GitHub
I am getting below error while executing playbook. Any help will be appreciated. ubuntu@i5:~/ansible$ ansible-playbook playbooks/hostname.yml.
Read more >
Attribute reference for IAM Conditions - Documentation
This topic describes supported attributes in a condition expression. Note: This page shows common uses of each function and operator. For more details...
Read more >
Time and time zones - pvlib python - Read the Docs
Version 0.2 of pvlib used a Location object's tz attribute to auto-magically correct for some time zone issues. This behavior was counter-intuitive to...
Read more >
1034235 – [abrt] livecd-tools-19.6-1.fc19: live.py:762:__ ...
... 'x86LiveImageCreator' object has no attribute '_isDracut' ... ks file: text skipx keyboard us timezone Europe/Berlin --utc lang en_US ...
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