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.
[Solved]ImportError when importing Images, Twitter and more
-
But why does this affect other modules?
-
@ccc and now it raised a new error
module "copyreq" has no attribute "pickle"Damn I wish there was a undo button in stash
-
Anything you installed in stash can be found by going to
cd ~/Documents/site-packages
then, if you find a folder you don't want, simply delete it
rm -rf twitter
if you have already imported the module, force quit pythonista, then restart, and you should be good to go.
-
@JonB didn't quite work.
I did remove the twitter folder, but now it's just back to the first error.
And I'm still wondering why this affects other modules. The ImportError says I'm either running Python-future from the src folder or it's corrupted, it think it's corrupted -
So, to be clear:
if you type
import twitter
in the console, running the 3.5 interpreter, you get that error?What about from the 2.7 interpreter.
Make sure you don't have another twitter.py somewhere...
import twitter
twitter.file
'/var/mobile/Containers/Bundle/Application/4F1ECB6D-347F-4B3F-870B-9156A42DBDB0/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/twitter.py' -
oh, the problem is that python twitter also installed future, since stash runs py2.7.
Delete future from site packages as well
-
@JonB future is now gone.
All I'm doing is
import twitter
It doesn't work in 3.5
It works in 2.7From the console(2.7):
>>> import twitter >>> twitter.__file__ '/var/containers/Bundle/Application/05B93F09-B103-44A6-9622-55237A53AC5E/Pythonista3.app/Frameworks/PythonistaKit.framework/pylib/site-packages/twitter.py'
-
@JonB is everything in site-packages what stash has installed?
If so, wouldn't trashing it all fix the problem? -
@uj_jonas yes,
stash
saves packages installed viapip
to thesite-packages
folder, but I wouldn't delete everything. Just look if there is a folder named Twitter insite-packages
And try renaming/deleting that one -
@lukaskollmer I got it all working again, except imgurpython.
I removed it from site-packages and tried to reinstall it with pip, but it wouldn't let me.