-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pythonista hangs on opening Photo Library #729
Comments
How long does |
30sec - 60secs and more. But it is also the same problem if i run "assets = photos.capture_image()" |
Does the following work if you leave out all of the import photos
def launch_img(sender):
print("Calling photos.get_assets(media_type='image')...")
assets = photos.get_assets(media_type='image')
print(f"{len(assets)} images found. -- Calling photos.pick_asset()")
assets = photos.pick_asset(assets, title='Select images', multi=True)
print(f"{len(assets)} images selected.")
if __name__ == "__main__":
launch_img(None) If not, does |
Hi, works fine with both True and False. The hanging just starts if i use a Button. |
Cool... So first get the images from the user and then once that is finished you can do the import photos
import ui
def launch_img(sender):
print("Calling photos.get_assets(media_type='image')...")
assets = photos.get_assets(media_type='image')
print(f"{len(assets)} images found. -- Calling photos.pick_asset()")
assets = photos.pick_asset(assets, title='Select images', multi=True)
print(f"{len(assets)} images selected.")
return assets
if __name__ == "__main__":
assets = launch_img(None)
if assets:
view = ui.load_view('image')
view.present()
|
No, sorry that is just a small example for the problem. The main app is much bigger and in this app i need to use a button. BR kami |
You probably need the |
Hi, BR kami |
Hi, any more infos? Can i use it globally? BR kami |
Hi,
i am using Pytonista on an Iphone 15 Pro (iOS 17.2.1) and Pythonista 3.4.
On a older Iphone XS (iOS 17.2.1) everything works fine. But on the new Iphone if i just press the Button form the UI. The Iphone App hangs a lot.
I i just run the "photos.pick_asset". It works fine. Could it be a problem with the Popup Function?
In the UI Script there is just a button which start the launchimg() function.
BR kami
The text was updated successfully, but these errors were encountered: