gxcuizy / python Goto Github PK
View Code? Open in Web Editor NEWPython3编写的各种大小程序,包含从零学Python系列、12306抢票、省市区地址库以及系列网站爬虫等学习源码
Python3编写的各种大小程序,包含从零学Python系列、12306抢票、省市区地址库以及系列网站爬虫等学习源码
File "/Library/Python/3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/Applications/Xcode12.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Applications/Xcode12.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\cuizy\AppData\Local\Programs\Python\Python36\Scripts\chromedriver.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "qiangpiao.py", line 270, in
ticket.start_brush()
File "qiangpiao.py", line 104, in start_brush
self.driver = Browser(driver_name=self.driver_name, executable_path=self.executable_path)
File "/Library/Python/3.8/site-packages/splinter/browser.py", line 90, in Browser
return get_driver(driver, retry_count=retry_count, *args, **kwargs)
File "/Library/Python/3.8/site-packages/splinter/browser.py", line 68, in get_driver
raise err
File "/Library/Python/3.8/site-packages/splinter/browser.py", line 64, in get_driver
return driver(*args, **kwargs)
File "/Library/Python/3.8/site-packages/splinter/driver/webdriver/chrome.py", line 43, in init
self.driver = Chrome(options=options, **kwargs)
File "/Library/Python/3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/Library/Python/3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'C:\Users\cuizy\AppData\Local\Programs\Python\Python36\Scripts\chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
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.
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()
[INFO ] [Logger ] Record log in C:\Users\Dheeraj.kivy\logs\kivy_22-01-19_1.txt
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\Dheeraj\AppData\Roaming\Python\Python38\site-packages\kivy_init_.py"
[INFO ] [Python ] v3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Dheeraj\AppData\Local\Programs\Python\Python38\pythonw.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [KivyMD ] 0.104.2, git-bc7d1f5, 2021-06-06 (installed at "C:\Users\Dheeraj\AppData\Local\Programs\Python\Python38\lib\site-packages\kivymd_init_.py")
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'2.1 Mesa 10.0.2 (git-675cd84)'>
[INFO ] [GL ] OpenGL vendor <b'VMware, Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits)'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.30'>
[INFO ] [GL ] Texture max size <8192>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [KivMob ] init called.
[WARNING] [KivMob ] Ads will not be shown.
[INFO ] [GL ] NPOT texture support is available
[INFO ] [Video ] Provider: null(['video_ffmpeg', 'video_ffpyplayer'] ignored)
[INFO ] [Base ] Start application main loop
Traceback (most recent call last):
File "C:\Users\Dheeraj\AppData\Roaming\Python\Python38\site-packages\plyer\platforms\win\filechooser.py", line 102, in run
self.fname, _, _ = win32gui.GetOpenFileNameW(**args)
pywintypes.error: (0, 'GetOpenFileNameW', 'No error message is available')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Dheeraj\AppData\Roaming\Python\Python38\site-packages\plyer\platforms\win\filechooser.py", line 108, in run
self._handle_selection(self.selection)
File "C:\Users\Dheeraj\Desktop\kivy codes\Dheeraj.py", line 949, in selected
Directory=selection[0]
IndexError: list index out of range
[INFO ] [Base ] Leaving application in progress...
Add images to explain us this bug. Paste urls here.
Remove this section if no images here
出发地和目的地没有我想要的,麻烦大佬加一下湖南郴州和到深圳的
初学python 如果说的不对 请见谅
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.