(please help) im having problem in my code
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- firebase, python
- 領域
- cloud, mobile-dev
研究方向
Start at app.file_chooser() and trace the selected(selection) callback when the Kivy file chooser is cancelled versus when a file is selected. Review the Firebase Storage upload path and the stated Windows and Android context; done means cancellation no longer raises an error and the selected-file upload behavior is understood on the supported platform.
由索引模型根據 Issue 內容生成。
描述
Description of the Bug
1.Hi Developers im new to coding. i tried to make this video uploading app to my firebase storage but im not that good at coding so im stuck at this problem. when upload button is pressed the filechooser is opened and if i select a file it gets uploaded to the firebase But if i cancel and close the filechooser it gives an error.
2. i am unaware if this file chooser works on android or nor...if it does not please help me with this code too. im stuck on this since 6 January ,thats how poor i am.
Code and Logs
from kivy.app import App
from kivy.lang import Builder
kv = '''
<MainScreen>:
name: 'mainscreen'
MDLabel:
id:username_info
text:'Hello Main'
font_style:'H1'
halign:'center'
MDFloatLayout:
id:floate
Video:
id:vid
MDToolbar:
title: 'Bottom navigation'
md_bg_color: .2, .2, .2, 1
specific_text_color: 1, 1, 1, 1
MDBottomNavigation:
panel_color: 1,1,1,1
MDBottomNavigationItem:
name: 'screen 1'
text: 'Home'
icon: 'home-outline'
MDRaisedButton:
id:upload
text:'Upload'
pos_hint:{'center_x':.5, 'center_y':.4}
on_release:
app.file_chooser()
upload.disabled=False
'''
class goodApp(MDApp):
def build(self):
self.strng = Builder.load_string(help_str)
self.url = "link.json"
return self.strng
def file_chooser(self):
filechooser.open_file(on_selection=self.selected)
def selected(self,selection):
config={
'Api keys of firebase'
}
firebase=pyrebase.initialize_app(config)
storage=firebase.storage()
Directory=selection[0]
Name=re.findall('[ \w-]+\..*',Directory)
loginEmail = self.strng.get_screen('loginscreen').ids.login_email.text
storage.child(str(f"{loginEmail}")).child(str(f"{Name}")).put(str(f"{Name[0]}"))
if selection==True:
self.root.ids.vid.source=firebase
self.strng.get_screen('mainscreen').ids.upload.disabled=True
self.strng.get_screen('mainscreen').manager.current ='uploadscreen'
self.strng.get_screen('mainscreen').manager.transition.direction='left'
if selection==False:
self.strng.get_screen('mainscreen').ids.upload.disabled=False
if __name__ == '__main__':
goodApp().run()
Screenshots
Add images to explain us this bug. Paste urls here.
Remove this section if no images here
Versions
- OS: win 7 pro
- Python: 3.7
- Kivy: latest
- KivyMD: latest (update everyweek)
- 主要語言
- Python
- 星號
- 28.1k
- 分支
- 5.6k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
walter201230/Python 的其他 Issue
-
变量拼写错误未關閉
難度 1/5 1 小時以內 新手友好度 78/100
walter201230/Python#318 ·
-
難度 2/5 1-3 小時 新手友好度 64/100
walter201230/Python#298 · 2 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 72/100
walter201230/Python#68 ·
-
難度 1/5 1 小時以內 新手友好度 62/100
walter201230/Python#11 ·
-
難度 3/5 半天 新手友好度 35/100
walter201230/Python#314 · 1 則留言 ·
查看 walter201230/Python 的全部 Issue
相似的 Issue
-
question
難度 2/5 1-3 小時 新手友好度 62/100
conda-forge/vc-feedstock#132 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
limitlessprojects/Go-Hybrid#3342 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
UKGovernmentBEIS/inspect_ai#6268 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
LSSTDESC/rail_sompz#42 ·
-
難度 2/5 1-3 小時 新手友好度 66/100
pytest-dev/pytest-forked#113 ·