当前位置:网站首页>Pycharm file name taboo

Pycharm file name taboo

2022-06-12 00:03:00 patrickpdx

Self created file name cannot be called abc.py, Otherwise, the following error will be reported
 Insert picture description here
Fatal Python error: init_sys_streams: can’t initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
File “D:\Anaconda\lib\io.py”, line 72, in
AttributeError: module ‘abc’ has no attribute ‘ABCMeta’

Reference resources :
If you name your file abc.py you’re shadowing the standard library’s abc (abstract base class). When you do that, everything that depends on the built-in abc will get yours instead. Unless you’ve essentially rewritten the standard library’s code, things will break.
– Ernst Jun 28, 2018 at 9:57

原网站

版权声明
本文为[patrickpdx]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203011545148753.html