OSError: [WinError 123] When trying example program
See original GitHub issueDescription The example program crashes at startup. It seems from the traceback that file locations/addresses are not handled correctly somewhere.
Code example to reproduce the issue: Litterally the example program from the wiki
import flet
from flet import IconButton, Page, Row, TextField, icons
def main(page: Page):
page.title = "Flet counter example"
page.vertical_alignment = "center"
txt_number = TextField(value="0", text_align="right", width=100)
def minus_click(e):
txt_number.value = int(txt_number.value) - 1
page.update()
def plus_click(e):
txt_number.value = int(txt_number.value) + 1
page.update()
page.add(
Row(
[
IconButton(icons.REMOVE, on_click=minus_click),
txt_number,
IconButton(icons.ADD, on_click=plus_click),
],
alignment="center",
)
)
if __name__ == '__main__':
flet.app(target=main)
Describe the results you received: Crash with following trace :
File "C:\Users\User\Miniconda3\Scripts\flet-script.py", line 9, in <module>
sys.exit(main())
File "C:\Users\User\Miniconda3\lib\site-packages\flet\flet.py", line 668, in main
my_observer.start()
File "C:\Users\User\Miniconda3\lib\site-packages\watchdog\observers\api.py", line 262, in start
emitter.start()
File "C:\Users\User\Miniconda3\lib\site-packages\watchdog\utils\__init__.py", line 93, in start
self.on_thread_start()
File "C:\Users\User\Miniconda3\lib\site-packages\watchdog\observers\read_directory_changes.py", line 67, in on_thread_start
self._handle = get_directory_handle(self.watch.path)
File "C:\Users\User\Miniconda3\lib\site-packages\watchdog\observers\winapi.py", line 316, in get_directory_handle
return CreateFileW(path, FILE_LIST_DIRECTORY, WATCHDOG_FILE_SHARE_FLAGS,
File "C:\Users\User\Miniconda3\lib\site-packages\watchdog\observers\winapi.py", line 112, in _errcheck_handle
raise ctypes.WinError()
OSError: [WinError 123] La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.
C:\Users\User\Miniconda3\python.exe: can't open file 'C:\\Users\\User\\OneDrive - MyDrive\\Documents\\Tests\\test\\http:\\127.0.0.1:57010': [Errno 22] Invalid argument
Describe the results you expected: The program shouldn’t have crashed and the window should have opened ?
Additional information you deem important (e.g. issue happens only occasionally): If I change the line to make it a browser app, it works without issue
Flet version (pip show flet
):
0.1.62
Operating system: Windows 10 x64 Version 10.0.19044 Build 19044
Additional environment details: Was using PyCharm IDE
Issue Analytics
- State:
- Created a year ago
- Comments:23 (9 by maintainers)
Top Results From Across the Web
OSError: [WinError 123] The filename, directory name, or ...
I ran into this error after executing python manage.py runserver . This was just after pulling the repository after not having worked on...
Read more >OSError: [WinError 123] The filename, directory name ... - GitHub
I think this is a bug triggered by the <string> part of the base temporary directory. @Eshan-Agarwal, if you could provide a self-contained ......
Read more >[OSError] MuseScore path not found - Google Groups
But when I try it on a Windows, it fails when I try to use MuseScore. ... OSError: [WinError 123] Incorrect syntax of...
Read more >Python WindowsError: [Error 123] The filename, directory ...
We shall try to solve the Python WindowsError: [Error 123] using some simple ... while performing read and write to file using python...
Read more >[WinError 123] The filename, directory name, or volume label ...
This article will show how to solve an error message appear as OSError: [WinError 123] The filename, directory name, or volume label syntax ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s been fixed in Flet 0.2.4 release.
therefore, one possibility is that the binary is build out as another package on conda, and the actual flet package will reference and include that downstream