omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    2
    3
    1579
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tkrk
      tkrk last edited by

      【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.

      1 Reply Last reply Reply Quote 0
      • dgelessus
        dgelessus last edited by

        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 your site-packages folder, see if there is a folder enum or a file enum.py, delete it, then restart Pythonista. After the restart, the standard enum module from Python 3.6 will be used again.

        enum is a standard Python module, so normally it shouldn't be installed in site-packages. However when you install libraries with Stash's pip command, sometimes an old enum module is installed into site-packages. This hides Python 3.6's enum module, and causes problems with some libraries that need new enum features from Python 3.6. It's always safe to delete the enum module from your site-packages - Python's standard version of enum 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.

        1 Reply Last reply Reply Quote 0
        • tkrk
          tkrk last edited by

          I got it all right!!
          It was a good choice to ask questions in English with courage.

          Thank you so much for your help!

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB Forums | Contributors