Pythonista crashes after installing Plotly through StaSh
Running Pythonista 3 on IOS 12 (iPhone 8+) crashes instantly after starting it up. I can see my code show up for a second and then it just crashes to my home screen.
It happened after installing Plotly with pip using StaSh. After installing it I closed the app because I had to go, but when trying to open it back up, it started crashing.
I have tried:
- Restarting phone
- Entering safe mode
- Offloading app and reinstalling it
- Using safari to load an example file
- Using another app to share something to Pythonista (nothing happens when I select "Run Pythonista Script" in the share dialogue.
I'm out of ideas on what to try =/. Of course, it could all be solved by simply deleting the app and installing it again, but I don't want to lose my project. Woulda been smart to use github haha
have you tried typing pythonista3:// into the safari address bar, and then opening pythonista when prompted? this starts you fresh, with no files in the editor.
Also, try going into share extension, see if you can get to the console (and execute, say, import os)
If so, we will be able to move your entire site-packages, site-packages-3, etc folders, and move any large files from the main Documents folder.
Running pythonista3:// into safari still crashes it and trying to share something into it crashes it instantly. :/
Does pythonista3:// crash immediately? Or after a few secs? Are you able to create a new file for instance?
Instantly. I mean I don’t mind losing my work (it was terrible code anyways lmao), but if other people have this problem I want the devs to be at least aware of it and hopefully a workaround to be available.
If you have any other ideas I’m down to try, otherwise I’ll reinstall it tomorrow.
@isaackoz now that you have used pythonista3, try rebooting, then open extension first. Maybe try safe mode again.
also, did you ever buy pythonista2? You can reinstall that and get to the files.
Finally, you could back up the app, reinstall it, then reinstall the backed up files.
Rebooting and trying the extension didn’t work.
I don’t have Pythonista 2 so that’s a no go.
How would I go about backing the files up like you said?
@isaackoz When you say Pythonista crashes immediately, it has perhaps enough time to process something.
If you can write a small script renaming site-package folder and put this script in iCloud Drive/Pythonista3, you could try to start it from safari via pythonista3://name?action=run&root=icloud.
Of course, you need to remove the app from the tasks list before and after.
Perhaps a silly idea
huh. This could actually possibly work. Do you know what the exact path to the site modules is? I think it was the third one Ploty was installed to.
@isaackoz to test the feasibility, you could begin with a little script that creates a little file in iCloud Drive, just to see if this script runs until its end
Ah true, good idea. I’ll try that tomorrow morning and let you know how it goes.
iCloud_path = ('/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/test.txt')
fil = open(iCloud_path,mode='wt')
I tried this and unfortunately it crashes before it runs. Oh well, guess it’s a reminder why you should back up your code haha. Thanks for helping me try though. Gonna just reinstall the app now.
did you try an itunes backup (does iExplorer work on recent devices? )
Unfortunately I saved it to my iPhone storage and not the iCloud storage haha. And I didn’t have any backups either so an iTunes backup wouldn’t do anything.
So basically I learned the hard way to save all your work in the iCloud folder because it stays if you delete the app and because... why not!