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.


    Issue with stash installing

    Pythonista
    pythonista stash
    3
    9
    5367
    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.
    • Iceteagreen
      Iceteagreen last edited by

      Hello everyone. I’m very new at Pythonista and coding in general. Recently I installed Pythonista to my devices: iPad 4 mini and iPhone 7. I am trying to figure out the way of adding new libraries and think that Stash can help me. But the thing is I cannot install it to my iPhone. When i run launch_stash.py ImportError (cannot import name ‘stash’) occurs. I force quitted from the app before running launch_stash, but the error still occurs. I even reinstalled the app. The same result.
      By the way, installing Stash was completed successfully when I installed it to my iPad.
      Any kind of assistance will be much appreciated. Thank you in advance!

      P.S. I’ve read the post
      https://forum.omz-software.com/topic/4519/unable-to-launch_stash-py-in-pythonista-3-for-ios
      As I believe it reflects my problem, however the instructions in that post didn’t help. I did everything that was posted there but the same very error keeps occurring.

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

        Did you do import requests as r; exec(r.get('http://bit.ly/get-stash').text)

        Iceteagreen 1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          What iOS version are you running?

          Are you using pyrhon2 or python3 interpreter? (Does launch_stash have the #!python2 shebang?)

          Check modules-> site-packages, site-packages2 and site-packages3 and let us know where stash is located.

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

            @ccc
            No i did not do this. Shall i do it in an empty script? Or where?
            @JonB
            iOS version is 12.4.1

            I tried to use both, I mean I hold the play button and chose both python 2.7 and python 3.6 options in pythonista. As for shebang #!python 2 in launch_stash, I did not find it in my launcher.

            Stash is located in site-packages

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

              @ccc
              Oh. I’m sorry. Yes. I did it. I downloaded everything, but I cannot launch it.

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

                Do you have a script or folder called stash that lives in your main documents folder?

                Iceteagreen 1 Reply Last reply Reply Quote 0
                • Iceteagreen
                  Iceteagreen @JonB last edited by

                  @JonB I do. This is the script where this code located:
                  import requests as r; exec(r.get('http://bit.ly/get-stash').text)
                  The script is called stash.py and located in ‘This iPhone’ folder. I guess this is the main folder

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

                    Delete that file, and all should be good.
                    When you run a script, like launch_stash, that folder becomes the top of the path, so when it tries to import stash, it is trying to import your script named stash instead of site-packages/stash.

                    Iceteagreen 1 Reply Last reply Reply Quote 0
                    • Iceteagreen
                      Iceteagreen @JonB last edited by

                      @JonB thank you very much, sir! It did work! Thank you!

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