python - 权限错误:[WinError 32] 该进程无法访问该文件,因为它正被另一个进程使用:
问题描述
我不断收到这个错误,我真的很想知道如何解决它。
[WinError 32] The process cannot access the file because it is being used by another process:
代码是
import pyrugga
pyrugga.Match("Filename.xml")
然后错误信息如下
PermissionError Traceback (most recent call last)
in
1 import pyrugga
----> 2 pyrugga.Match("Filename.xml").close()
C:\ProgramData\Anaconda3\lib\site-packages\pyrugga\match.py in __init__(self, fn_name, zones)
37 """
38 (self.events,self.summary,self.players) = to_df(fn_name)
---> 39 self._genTimeLine()
40
41 """
C:\ProgramData\Anaconda3\lib\site-packages\pyrugga\match.py in _genTimeLine(self)
75 sql = open(os.path.join(d, 'timeline.sql'), 'r').read()
76
---> 77 os.remove(tmp_filename)
78
79 timeline = pd.io.sql.read_sql(sql,conn)
PermissionError: [WinError 32] The process cannot access the file because it is being used by
another process: '1b7f6c10-1809-46af-831a-6121a688ad45'
解决方案
推荐阅读
- node.js - 我在使用 mongodb 对节点 js 应用程序进行 dockerizing 时遇到问题
- sql - 用于获取具有在另一个字段中共享相同值的 id 的行的自联接查询问题
- javascript - 如何在不重新加载页面的情况下更改地址栏中的完整 URL?
- angular - AWS cognito 中的条款和条件
- javascript - 启用暗模式,每个按钮共享同一个类
- c# - 欺骗本地文件的远程位置
- batch-file - 从变量中去除尾随空格
- node.js - Axios - 如果我已经声明了函数返回类型,我应该“键入断言”返回的数据吗?
- javascript - 从 Pick 映射数据时未定义
- php - 有没有办法为当前正在查看它的每个人刷新页面?