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

3.16 pytz模块导入问题 #358

Open
wenzhenhao opened this issue Jul 21, 2022 · 1 comment
Open

3.16 pytz模块导入问题 #358

wenzhenhao opened this issue Jul 21, 2022 · 1 comment

Comments

@wenzhenhao
Copy link

问题描述:
"解决方案"中,timezonefrom pytz import timezone的方式导入。
但在“讨论”中,未有导入pytz的语句,且访问了pytz.utcpytz.country_timezones。我在运行时会出现NameError: name 'pytz' is not defined

以下给出我的一点修改建议:
from pytz import timezone改成from pytz import timezone, utc, country_timezones
pytz.utc改成utc
pytz.country_timezones改成country_timezones

谢谢

@renzituo95
Copy link

renzituo95 commented Jul 21, 2022 via email

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

No branches or pull requests

2 participants