This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: attribute error
Type: crash Stage: resolved
Components: Extension Modules Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: nixster, peter.otten
Priority: normal Keywords:

Created on 2017-08-23 19:38 by nixster, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
temp1.py nixster, 2017-08-23 19:38 template from string module
Messages (3)
msg300763 - (view) Author: emin mamedov (nixster) * Date: 2017-08-23 19:38
Hello!
I am just write some program with "string module", after starting my program python give me error about "re module".

My program is a tutorial from DrapsTV from Youtube.

Error -->>
Traceback (most recent call last):
  File "temp1.py", line 1, in <module>
    from string import Template
  File "/usr/lib64/python3.6/string.py", line 77, in <module>
    class Template(metaclass=_TemplateMetaclass):
  File "/usr/lib64/python3.6/string.py", line 82, in Template
    flags = _re.IGNORECASE
AttributeError: module 're' has no attribute 'IGNORECASE'
msg300764 - (view) Author: Peter Otten (peter.otten) * Date: 2017-08-23 20:05
You have probably written your own re.py file which shadows the one in the standard library. Once you remove or rename your re.py the error should go away.
msg300771 - (view) Author: emin mamedov (nixster) * Date: 2017-08-24 01:25
Thank you Peter, problem has fixed.

I think, python interpreter must understand if a "temp1.py" will start in same directory with file "re.py", this is not a native module for python and interpreter can ignore re.py from user directory and etc.
History
Date User Action Args
2022-04-11 14:58:51adminsetgithub: 75449
2017-08-24 01:25:16nixstersetstatus: open -> closed
resolution: fixed
messages: + msg300771

stage: resolved
2017-08-23 20:05:06peter.ottensetnosy: + peter.otten
messages: + msg300764
2017-08-23 19:38:33nixstercreate