I am trying to create a signup screen that will allow users to also upload resumes and other file. I attempted doing so using filechooser, but it is not working. Do You please have any suggestion on how it can be done?
class SignupWindow(Screen):
first_name: ObjectProperty(None)
middle_name: ObjectProperty(None)
last_name: ObjectProperty(None)
email2 = ObjectProperty(None)
password2: ObjectProperty(None)
profession: ObjectProperty(None)
def signupbtn(self):
user = auth.create_user_with_email_and_password(self.email2.text, self.password2.text)
auth.send_email_verification(user['idToken'])
user_info = {
u'Last name' : self.last_name.text,
u'Middle name' : self.middle_name.text,
u'First name': self.first_name.text,
u'Email' : self.email2.text,
u'Profession' : self.profession.text,
u'birth' : self.birth.text
}
db.collection(u'users').document(self.email2.text).set(user_info)
sm.current = 'login'
def Resume_selection(self):
image_path = self.fc.selection[0]
image_name = file_path.split('/')[-1]
<SignupWindow>:
first_name: first_name
middle_name: middle_name
last_name: last_name
email2: email2
password2: password2
profession: profession
birth: birth
phone: phone
resume: resume
ScrollView:
GridLayout:
orientation: "vertical"
size_hint_y: None
height: self.minimum_height
row_default_height: 30
cols:2
spacing: 15, 15
padding: 100, 100
Label:
text : "First Name: "
TextInput:
id : first_name
hint_text: "First name"
multiline : False
Label:
text : "Middle Name: "
TextInput:
id : middle_name
hint_text: "Middle name"
multiline : False
Label:
text : "Last Name: "
TextInput:
id : last_name
hint_text: "Last name"
multiline : False
Label:
text : "Date of Birth: "
TextInput:
id : birth
hint_text: "mm/dd/yyyy"
multiline : False
Label:
text : "Email: "
TextInput:
id : email2
hint_text: "email@domain.com"
multiline : False
Label:
text : "Password: "
TextInput:
id : password2
hint_text: "Choose a password"
multiline : False
password: True
Label:
text : "Password: "
TextInput:
hint_text: "Type your password again"
multiline : False
password: True
Label:
text : "Phone number: "
TextInput:
id : phone
hint_text: "xxx-xxx-xxxx "
multiline : False
Label:
text : "Profession: "
TextInput:
id : profession
hint_text: "Profession"
multiline : False
Label:
text : "Resume: "
#TextInput:
id : resume
hint_text: "Please attach your Resume"
multiline : False
#FileChooserIconView:
id: resume
text: "Upload Resume"
FileChooserIconView:
id:filechooser
title: 'Upload a resume'
size: self.size
pos : self.pos
on_selection : root.Resume_selection(filechooser.selection)
Button:
text : "Submit"
on_press :
root.signupbtn()
root.manager.transition.direction = "right"
Button:
text : "Login"
on_release:
root.manager.current = 'login'
root.manager.transition.direction = "up"
The following is the error:
[ERROR ] unable to access to <\hiberfil.sys> Traceback (most recent call last): File "C:\Users\remio\PycharmProjects\pythonProject1\venv\lib\site-packages\kivy\uix\filechooser.py", line 178, in is_hidden return GetFileAttributesExW(fn)[0] & FILE_ATTRIBUTE_HIDDEN pywintypes.error: (32, 'GetFileAttributesEx', 'The process cannot access the file because it is being used by another process.') [ERROR ] unable to access to <\pagefile.sys> Traceback (most recent call last): File "C:\Users\remio\PycharmProjects\pythonProject1\venv\lib\site-packages\kivy\uix\filechooser.py", line 178, in is_hidden return GetFileAttributesExW(fn)[0] & FILE_ATTRIBUTE_HIDDEN pywintypes.error: (32, 'GetFileAttributesEx', 'The process cannot access the file because it is being used by another process.') [ERROR ] unable to access to <\swapfile.sys> Traceback (most recent call last): File "C:\Users\remio\PycharmProjects\pythonProject1\venv\lib\site-packages\kivy\uix\filechooser.py", line 178, in is_hidden return GetFileAttributesExW(fn)[0] & FILE_ATTRIBUTE_HIDDEN pywintypes.error: (32, 'GetFileAttributesEx', 'The process cannot access the file because it is being used by another process.')
Thanks!!!