I have a working Django PyCharm 3.4.1 project which i have been working on for month without problems!
But now PyCharm for some reason marks all python build-in exceptions as unresolved . Other Features like code completion and debugging remain to work fine.
The issue started as i created a package named "exceptions" and tried to move a few Exception-derived classed via "refactor" into that package - the operation completed without displaying any error but the involved source files were not modified as if the operation did not happen.
After realizing the possible name conflict with the build-in exceptions i deleted the folder - effectively putting the source files back into the initial state.
Unfortunate the issue remained even after i:
Do you have ideas or suggestions on how to make PyCharm get these names right again and to resolve the issue?
I found a way to resolve the issue:
exchanged the filetypes.xml which looked like this
<?xml version="1.0" encoding="UTF-8"?> <application> <component name="FileTypeManager" version="11"> <ignoreFiles list="CVS;SCCS;RCS;rcs;.DS_Store;.svn;.pyc;.pyo;*.pyc;*.pyo;.git;*.hprof;_svn;.hg;*.lib;*~;__pycache__;.bundle;*.rbc;*$py.class;" /> <extensionMap> <mapping pattern="exceptions.py" type="PLAIN_TEXT" /> <mapping ext="spec" type="PLAIN_TEXT" /> </extensionMap> </component> </application>
with
<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="FileTypeManager" version="11">
<ignoreFiles list="CVS;SCCS;RCS;rcs;.DS_Store;.svn;.pyc;.pyo;*.pyc;*.pyo;.git;*.hprof;_svn;.hg;*.lib;*~;__pycache__;.bundle;*.rbc;*$py.class;" />
<extensionMap>
<mapping ext="spec" type="PLAIN_TEXT" />
</extensionMap>
</component>
</application>
After searching for about 7 hours for what causes the bug by exporting settings, resetting all IDE settings and importing settings back module my module i found this solution.
After identifying the filetypes module of the IDE as the problem i tried to modify the problematic module via the settings dialog but could not find a way.
I wander what caused the IDE to create the
<mapping pattern="exceptions.py" type="PLAIN_TEXT" />
entry - when trying to reproduce the issue it would no longer occur - even my refactoring operation succeed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.