Skip to content

Small Typo with location import#51

Open
neo14515 wants to merge 1 commit into
C2N14:masterfrom
neo14515:patch-1
Open

Small Typo with location import#51
neo14515 wants to merge 1 commit into
C2N14:masterfrom
neo14515:patch-1

Conversation

@neo14515
Copy link
Copy Markdown

Hello,
I just updated the name of the Location class as with the capital letter the program refuse to start and I got the following error:
ImportError: cannot import name 'Location' from 'astral' (/usr/lib/python3.8/site-packages/astral/init.py)

Cheers

Hello,
I just updated the name of the Location class as with the capital letter the program refuse to start and I got the following error: 
ImportError: cannot import name 'Location' from 'astral' (/usr/lib/python3.8/site-packages/astral/__init__.py)

Cheers
import pytz
import tzlocal
from astral import Location
from astral import location
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be instead

Suggested change
from astral import location
from astral.location import Location

Otherwise, the code on line 66 of the same file will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants