Я скомпилировал dune в виртуальной среде pipenv, используя Python 3.5.2 в Ubuntu 16.04. Он успешно скомпилирован, но когда я запускаю следующий скрипт, я получаю ошибку дескриптора плохого файла и не знаю почему.
from dune.grid import structuredGrid
grid = structuredGrid([0,0],[1,1],[10,10])
grid.plot()
Это ошибка трассировки:
(dune) pcsgs04:[dune] >pipenv run python scripts/testGrid.py
Traceback (most recent call last):
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/portalocker.py", line 137, in lock
fcntl.flock(file_.fileno(), flags)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/utils.py", line 131, in acquire
fh = self._get_lock(fh)
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/utils.py", line 180, in _get_lock
portalocker.lock(fh, self.flags)
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/portalocker.py", line 141, in lock
raise exceptions.LockException(exc_value, fh=file_)
portalocker.exceptions.LockException: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "scripts/testGrid.py", line 2, in <module>
grid = structuredGrid([0,0],[1,1],[10,10])
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/grid/core.py", line 44, in structuredGrid
return yaspGrid(domain, dimgrid=len(lower))
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/grid/_grids.py", line 40, in yaspGrid
gridModule = module(includes, typeName, ctor)
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/grid/grid_generator.py", line 199, in module
module = generator.load(includes, typeName, typeHash, *args, **kwargs)
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/generator/generator.py", line 147, in load
return self.post(moduleName, source)
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/generator/generator.py", line 105, in post
module = builder.load(moduleName, source, self.typeName[0])
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/dune/generator/builder.py", line 109, in load
with Lock(os.path.join(self.dune_py_dir, 'lock-all.lock'), flags=LOCK_SH):
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/utils.py", line 197, in __enter__
return self.acquire()
File "/home/user/.local/share/virtualenvs/dune-gkp4O1Gp/lib/python3.5/site-packages/portalocker/utils.py", line 157, in acquire
raise exceptions.LockException(exception)
portalocker.exceptions.LockException: [Errno 9] Bad file descriptor
Кто-нибудь может мне объяснить, что означает эта проблема, я не совсем понимаю, какие файлы заблокированы, и выкинуть это исключение.