(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
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retries未关闭follow-up
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Built-in QUBO fallback applies bitwise xor to floating binary states可能已有人在做 @iloveeyjafjalla 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
qboson/kaiwu-pytorch-plugin#1702 ·
维护者通常 3 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3811 ·
维护者通常 1 天内回复
-
cost:cheap practicality:seen-in-the-wild severity:medium
难度 2/5 1-3 小时 新手友好度 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
维护者通常 1 天内回复