Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 权限错误:[WinError 32]进程无法访问该文件,因为另一个进程正在使用该文件:_Python - Fatal编程技术网

Python 权限错误:[WinError 32]进程无法访问该文件,因为另一个进程正在使用该文件:

Python 权限错误:[WinError 32]进程无法访问该文件,因为另一个进程正在使用该文件:,python,Python,我一直在犯这个错误,我真的被困在如何解决它 [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

我一直在犯这个错误,我真的被困在如何解决它

[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'

关闭文件?该文件尚未打开,似乎有一些后台进程隐式地将其打开