omz / Pythonista-Issues

Issue tracker for Pythonista (iOS)
169 stars 14 forks source link

External sources import dialogue does not allow folder selection #616

Open sutheim opened 5 years ago

sutheim commented 5 years ago

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.

sinkaszab commented 5 years ago

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

sutheim commented 5 years ago

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.

sinkaszab commented 5 years ago

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?

dgelessus commented 5 years ago

@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.