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

时间:2019-11-07 10:19:30

标签: 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)
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'

0 个答案:

没有答案