Pyrebase4 icon indicating copy to clipboard operation
Pyrebase4 copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: 'None'

Open boyintheroom opened this issue 1 year ago • 0 comments

Make sure these boxes are checked before submitting your issue:

[✅] Check that your version of Python is 3.4+ [✅] Check that you are on the newest version of Pyrebase [✅] Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.

II was trying to put a file to firebase which i selected from filechoser(plyer), it threw me this error.

05-19 14:49:35.186  6157  6157 I python  :  Traceback (most recent call last):
05-19 14:49:35.187  6157  6157 I python  :    File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
05-19 14:49:35.187  6157  6157 I python  :    File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
05-19 14:49:35.187  6157  6157 I python  :    File "/home/dheeraj/phenon/.buildozer/android/platform/build-armeabi-v7a_arm64-v8a_x86_x86_64/build/python-installs/Phenon/arm64-v8a/android/activity.py", line 35, in onActivityResult
05-19 14:49:35.188  6157  6157 I python  :    File "/home/dheeraj/phenon/.buildozer/android/platform/build-armeabi-v7a_arm64-v8a_x86_x86_64/build/python-installs/Phenon/arm64-v8a/plyer/platforms/android/filechooser.py", line 195, in _on_activity_result
05-19 14:49:35.188  6157  6157 I python  :    File "/home/dheeraj/phenon/.buildozer/android/app/main.py", line 679, in selectedTree
05-19 14:49:35.188  6157  6157 I python  :    File "/home/dheeraj/phenon/.buildozer/android/app/main.py", line 698, in Tree_to_database
05-19 14:49:35.188  6157  6157 I python  :    File "/home/dheeraj/phenon/.buildozer/android/platform/build-armeabi-v7a_arm64-v8a_x86_x86_64/build/python-installs/Phenon/arm64-v8a/pyrebase/pyrebase.py", line 462, in put
05-19 14:49:35.189  6157  6157 I python  :  FileNotFoundError: [Errno 2] No such file or directory: 'None'

i little of my code for you to understand

import pyrebase
from requests import urllib3
import requests

    def Upload(self, arg):
        from plyer import filechooser
        self.dialog.dismiss()
        filechooser.open_file(on_selection=(self.boby))


    def boby(self, selection): 
        from plyer import filechooser    
        if selection:           
            self.Directory = selection[0]
        self.India()

    def India(self):
        video=self.Directory
        firebase = pyrebase.initialize_app(config)
        storage = firebase.storage()
        storage.child('dheeraj').put(str(f"{video}"))

boyintheroom avatar May 19 '23 10:05 boyintheroom