plyer icon indicating copy to clipboard operation
plyer copied to clipboard

plyer android file chooser crush when I choose file from downloads folder

Open ghost opened this issue 3 years ago • 1 comments

I'm already ask for

Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE,

when I pick image from downloads folder the chooser stop with the below log but not in any other folder also If i move those files to another folder every thing works fine

and also II want to know if its possible to make only for the user to choose images and not other format


11-12 22:50:13.452  6181  6181 I python  :  Traceback (most recent call last):
11-12 22:50:13.453  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
11-12 22:50:13.453  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
11-12 22:50:13.453  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/android/activity.py", line 35, in
 onActivityResult
11-12 22:50:13.454  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 147, in _on_activity_result
11-12 22:50:13.454  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 321, in _resolve_uri
11-12 22:50:13.454  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 245, in _handle_downloads_documents
11-12 22:50:13.455  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 247, in <listcomp>
11-12 22:50:13.455  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1145, in jnius.jnius.JavaMultipleMethod.__call__
11-12 22:50:13.455  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 856, in jnius.jnius.JavaMethod.__call__
11-12 22:50:13.456  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1028, in jnius.jnius.JavaMethod.call_staticmethod
11-12 22:50:13.456  6181  6181 I python  :    File "jnius/jnius_utils.pxi", line 91, in jnius.jnius.check_exception
11-12 22:50:13.456  6181  6181 I python  :  jnius.jnius.JavaException: JVM exception occurred: For input string: "msf:13198" java.lang.NumberFormatException
11-12 22:50:18.991  6181  6181 I python  :  Traceback (most recent call last):
11-12 22:50:18.992  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
11-12 22:50:18.993  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
11-12 22:50:18.993  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/android/activity.py", line 35, in
 onActivityResult
11-12 22:50:18.993  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 147, in _on_activity_result
11-12 22:50:18.994  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 321, in _resolve_uri
11-12 22:50:18.994  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 245, in _handle_downloads_documents
11-12 22:50:18.994  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 247, in <listcomp>
11-12 22:50:18.995  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1145, in jnius.jnius.JavaMultipleMethod.__call__
11-12 22:50:18.995  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 856, in jnius.jnius.JavaMethod.__call__
11-12 22:50:18.995  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1028, in jnius.jnius.JavaMethod.call_staticmethod
11-12 22:50:18.996  6181  6181 I python  :    File "jnius/jnius_utils.pxi", line 91, in jnius.jnius.check_exception
11-12 22:50:18.996  6181  6181 I python  :  jnius.jnius.JavaException: JVM exception occurred: For input string: "msf:13203" java.lang.NumberFormatException
11-12 22:50:29.331  6181  6181 I python  :  Traceback (most recent call last):
11-12 22:50:29.331  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
11-12 22:50:29.332  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
11-12 22:50:29.332  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/android/activity.py", line 35, in
 onActivityResult
11-12 22:50:29.332  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 147, in _on_activity_result
11-12 22:50:29.332  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 321, in _resolve_uri
11-12 22:50:29.333  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 245, in _handle_downloads_documents
11-12 22:50:29.333  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 247, in <listcomp>
11-12 22:50:29.333  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1145, in jnius.jnius.JavaMultipleMethod.__call__
11-12 22:50:29.333  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 856, in jnius.jnius.JavaMethod.__call__
11-12 22:50:29.334  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1028, in jnius.jnius.JavaMethod.call_staticmethod
11-12 22:50:29.334  6181  6181 I python  :    File "jnius/jnius_utils.pxi", line 91, in jnius.jnius.check_exception
11-12 22:50:29.334  6181  6181 I python  :  jnius.jnius.JavaException: JVM exception occurred: For input string: "msf:13203" java.lang.NumberFormatException
11-12 22:50:34.647  6181  6181 I python  :  Traceback (most recent call last):
11-12 22:50:34.648  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
11-12 22:50:34.648  6181  6181 I python  :    File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
11-12 22:50:34.648  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/android/activity.py", line 35, in
 onActivityResult
11-12 22:50:34.649  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 147, in _on_activity_result
11-12 22:50:34.649  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 321, in _resolve_uri
11-12 22:50:34.650  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 245, in _handle_downloads_documents
11-12 22:50:34.650  6181  6181 I python  :    File "/content/.buildozer/android/platform/build-arm64-v8a/build/python-installs/WhoUp/plyer/platforms/android/filechoos
er.py", line 247, in <listcomp>
11-12 22:50:34.650  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1145, in jnius.jnius.JavaMultipleMethod.__call__
11-12 22:50:34.651  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 856, in jnius.jnius.JavaMethod.__call__
11-12 22:50:34.651  6181  6181 I python  :    File "jnius/jnius_export_class.pxi", line 1028, in jnius.jnius.JavaMethod.call_staticmethod
11-12 22:50:34.651  6181  6181 I python  :    File "jnius/jnius_utils.pxi", line 91, in jnius.jnius.check_exception
11-12 22:50:34.652  6181  6181 I python  :  jnius.jnius.JavaException: JVM exception occurred: For input string: "msf:13198" java.lang.NumberFormatException

ghost avatar Nov 13 '21 21:11 ghost

Currently the plyer filechooser doesn't allow for selection from the downloads folder directly. This is because it is no longer a folder and actually a file provider on the more newer versions of android. An user can select a file from the downloads folders if they first navigate into the main storage of this phone and from there navigate to the downloads folder. But it they directly click the downloads shortcut on the side you will get the above error

Guhan-SenSam avatar Nov 22 '21 02:11 Guhan-SenSam