Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

External sources import dialogue does not allow folder selection

Open sutheim opened this issue 6 years ago • 4 comments
trafficstars

On latest iOS 13.1 with latest pythonista beta 330015, you cannot import folders, only files, using the external files importer. From what I understand this is because of some api change in the latest iOS.

sutheim avatar Oct 04 '19 18:10 sutheim

I am using the last production release and have the same issue. Is Pythonista still being developed?

sinkaszab avatar Oct 08 '19 20:10 sinkaszab

I am using the last production release and have the same issue. Is Pythonista still being developed?

I believe it is, I'm on the latest beta which is only a couple weeks old. For your information one way of getting around this is to put whatever project folder you need in the pythonista iCloud folder. For example I've got Working Copy set up to sync to that folder.

sutheim avatar Oct 10 '19 21:10 sutheim

Unfortunately this synced repository doesn't work for me with using pytest. Missing out on TDD doesn't work for me even.

import file mismatch:
imported module 'myproj.test.test_file' has this __file__ attribute:
  /private/var/mobile/Containers/Shared/AppGroup/80C570C0-D095-41B8-8861-7EA6FB7F886D/Pythonista3/Documents/myproj/test/test_file.py
which is not the same as the test file we want to collect:
  /private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/synced/myproj/test/test_file.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

I wasn't aware of this recent beta. Is it still possible to join?

sinkaszab avatar Oct 11 '19 19:10 sinkaszab

@sinkaszab Regarding the pytest error message, you probably need to restart Pythonista after you move your module to a different location. Otherwise Python's cache of imported modules (sys.modules) still contains a loaded copy of your module that points to the old path of the source code. Normally Pythonista automatically reloads modules to prevent caching problems like these, but it's possible that this doesn't work correctly when a module is moved to a different location.

The TestFlight invite link for the Pythonista 3.3 beta can be found in this forum thread.

dgelessus avatar Oct 11 '19 21:10 dgelessus