Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
【Help!!】Errors that always appear at startup
-
【Help!!】Errors that always appear at startup
Hi,
Since I do not usually use English, I am not used to English communication. So there may be places that it is difficult to understand, but I want you to help as much as possible!!I am using pythonista on my iPad and iPhone, but I am a beginner.
The other day an error while working on the iPad was displayed on the console. I can not understand the meaning of the error well and I can not run most programs if I deleted or reinstalled the most recently installed module. Even if I reinstall Pythonista, the error is not resolved, and the error displayed frequently changes, but now the following error message is displayed on the console every time it starts up.———————————————————————————————————————————————
Traceback (most recent call last):
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pykit_startup.py", line 51, in <module>
main()
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pykit_startup.py", line 47, in main
import importcompletion
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/importcompletion.py", line 26, in <module>
import imp
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/imp.py", line 28, in <module>
import tokenize
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/tokenize.py", line 34, in <module>
import re
File "/var/containers/Bundle/Application/CDBBFE2B-6DF3-4E52-987B-AF5775D335F6/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
———————————————————————————————————————————————I'm doing fine on the iPhone, so I think that something that I installed on iPad has influenced. I could not find a solution in the Pytonista environment even if I looked it up on the Internet and I could not cope because of my lack of knowledge.
Although initialization of the environment is also taken into consideration, please tell me what to do.
-
Hi, welcome!
This is a common issue. It happens when you have an old copy of Python's
enum
module installed manually that is incompatible with Python 3.6. To fix this, go into yoursite-packages
folder, see if there is a folderenum
or a fileenum.py
, delete it, then restart Pythonista. After the restart, the standardenum
module from Python 3.6 will be used again.enum
is a standard Python module, so normally it shouldn't be installed insite-packages
. However when you install libraries with Stash'spip
command, sometimes an oldenum
module is installed intosite-packages
. This hides Python 3.6'senum
module, and causes problems with some libraries that need newenum
features from Python 3.6. It's always safe to delete theenum
module from yoursite-packages
- Python's standard version ofenum
is stored in a different (read-only) location, so that will be used again after a Pythonista restart.By the way, your English is fine, don't worry. :) But if you have any questions, please ask.
-
I got it all right!!
It was a good choice to ask questions in English with courage.Thank you so much for your help!