Tag Archives: flash error

How to Solve flash error: “ModuleNotFoundError” or “tzlocal.utils.ZoneInfoNotFoundError”

1. Running flash reports an error

ModuleNotFoundError: No module named 'flask._compat'

Problem analysis: generally, the problem is that the flash version is too high. It seems that there is no ‘flash_ Compat ‘so an error is reported. Reduce the flash version to solve the problem

pip uninstall flask
pip install flask==1.1.4

2. Error reporting

tzlocal.utils.ZoneInfoNotFoundError: 'Multiple conflicting time zone configurations 
found:\n/etc/timezone: Asia/Shanghai\n/etc/localtime is a symlink to: PRC\nFix the configuration, 
or set the time zone in a TZ environment variable.\n'

Problem analysis: the problem is caused by the time zone. One is timezone and the other is Localtime

vim /etc/timezone 
rm -f /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime