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 - I corrupted my Pythonista somehow

    Pythonista
    3
    10
    3376
    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.
    • Phuket2
      Phuket2 last edited by Phuket2

      I am not sure how I have managed to do this. But I have corrupted my Pythonista v311008. If I import json I get the below traceback. I only get the traceback after I restart, because if I tap the print traceback the app quits. The corruption seems to be limited to importing json. I had been playing with shelve when the Corruption started ( I was using faker and adding a lot of records into shelve).
      Not sure if there is an easy way to fix this. I don't want to delete the app. My thoughts are that I download the App Store version, then install the test flight version after. Just wanted to ask first, so I don't screw it up.

      --edit if I run with 2.7, I don't get the problem. Also I should mention I did a full restart of my ipad

      Traceback (most recent call last):
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pykit_startup.py", line 51, in <module>
      main()
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pykit_startup.py", line 47, in main
      import importcompletion
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/importcompletion.py", line 26, in <module>
      import imp
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/imp.py", line 28, in <module>
      import tokenize
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/tokenize.py", line 34, in <module>
      import re
      File "/var/containers/Bundle/Application/EA1EEECB-E4B2-4C5F-ACE0-B7287FEACF04/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/re.py", line 143, in <module>
      class RegexFlag(enum.IntFlag):
      AttributeError: module 'enum' has no attribute 'IntFlag'

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

        in Safari, go to the following URLs:

        • pythonista://
        • pythonista2://
        • pythonista3://
        Phuket2 1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @ccc last edited by

          @ccc , sorry I was not clear. I am not locked out of Pythonista, but I have corrupted the json lib by the looks of things. I can use it anymore. Just importing it creates the error

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

            Possibly using stash to update it may work, but i was unsure. Might make things worse

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

              Did you quit Pythonista and try my suggestions anyway?

              Phuket2 1 Reply Last reply Reply Quote 0
              • Phuket2
                Phuket2 @ccc last edited by

                @ccc , yes i did. The first 2 cmds load Pythonista 2 app which i still have. But i did try it in case there was some magic I didn't know about. I also disabled my startup script.

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

                  @Phuket2 Do you have an enum.py module or enum folder in your site-packages or site-packages-3? enum.IntFlag (the class that's missing and causing the exception) is new in Python 3.6, so if you manually installed a different version of the enum module previously, you need to delete it or update it.

                  Phuket2 1 Reply Last reply Reply Quote 3
                  • Phuket2
                    Phuket2 @dgelessus last edited by

                    @dgelessus , i have a enum folder in my site-packages folder. Should I just delete it? I didn't Install it directly, maybe a package i installed, installed it

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

                      Rename enum in your site-packages to was-enum and completely reboot.

                      Phuket2 1 Reply Last reply Reply Quote 1
                      • Phuket2
                        Phuket2 @ccc last edited by

                        @ccc , thanks , that fixed it. Not sure how that enum dir got in there. I was using shelve and json. But fixed now, and it inspired me to do a full backup :)

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