Python PermissionError:[WinError 31] 连接到系统的设备无法运行

问题描述 投票:0回答:1

程序从文件服务器共享位置读取所有文件数据并将数据插入数据库

执行python程序时出现以下错误 文件“C:\Users\xxxxx\Anaconda3\lib\site-packages\watchdog\observers\winapi.py”,第 112 行,位于 _errcheck_handle 中 引发 ctypes.WinError() PermissionError:[WinError 31] 连接到系统的设备无法运行。

Screenshot of the error

文件“C:\Users\xxxxxx\Anaconda3\lib\site-packages\watchdog\observers pi.py”,第 256 行,在开始处 发射器.start() 文件“C:\Users\xxxxxx\Anaconda3\lib\site-packages\watchdog\utils_init_.py”,第 93 行,在开始处 self.on_thread_start() 文件“C:\Users\xxxxxx\Anaconda3\lib\site-packages\watchdog\observers ead_directory_changes.py”,第 66 行,在 on_thread_start 中 self._handle = get_directory_handle(self.watch.path) 文件“C:\Users\xxxxxx\Anaconda3\lib\site-packages\watchdog\observers\winapi.py”,第 316 行,在 get_directory_handle 中 返回CreateFileW(路径,FILE_LIST_DIRECTORY,WATCHDOG_FILE_SHARE_FLAGS, 文件“C:\Users\xxxxxx\Anaconda3\lib\site-packages\watchdog\observers\winapi.py”,第 112 行,位于 _errcheck_handle 中 引发 ctypes.WinError() PermissionError:[WinError 31] 连接到系统的设备无法运行。

进程已完成,退出代码为 1

python runtime-error anaconda3
1个回答
0
投票

您可以尝试这个解决方案。它对我有用。

https://careerkarma.com/blog/python-permissionerror-errno-13-permission-denied/

如果它不适合您,请告诉我。我可以提供另一种解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.