MIRACL not working from CLI or GUI in latest version
jono3030 opened this issue · 1 comments
jono3030 commented
Executing miracl
with or without flags from the CLI does not work anymore. The GUI opens but executing any function causes MIRACL to crash.
No changes have been committed to the repo since it worked a few days ago. It's therefore reasonable to assume that the issue is likely caused by an updated package that gets downloaded when the Docker image gets created.
Output:
Traceback (most recent call last):
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3030, in _dep_map
return self.__dep_map
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2826, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in __init__
parsed = parse_requirement(requirement_string)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement
return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement
url, specifier, marker = _parse_requirement_details(tokenizer)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 120, in _parse_requirement_details
specifier = _parse_specifier(tokenizer)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 209, in _parse_specifier
tokenizer.consume("WS")
File "/opt/miniconda/lib/python3.7/contextlib.py", line 119, in __exit__
next(self.gen)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 185, in enclosing_tokens
span_start=open_position,
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 166, in raise_syntax_error
span=span,
pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected closing RIGHT_PARENTHESIS
fury (>=0.8.0scikit-learn) ; extra == 'all'
~~~~~~~~^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda/bin/miracl", line 33, in <module>
sys.exit(load_entry_point('MIRACL', 'console_scripts', 'miracl')())
File "/opt/miniconda/bin/miracl", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/miniconda/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 207, in load
module = import_module(match.group('module'))
File "/opt/miniconda/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/code/miracl/cli.py", line 19, in <module>
from miracl.connect import cli_connect
File "/code/miracl/connect/cli_connect.py", line 5, in <module>
from miracl.connect import miracl_connect_label_graph_proj_dens, miracl_connect_ROI_matrix_connectogram
File "/code/miracl/connect/miracl_connect_label_graph_proj_dens.py", line 18, in <module>
from allensdk.core.mouse_connectivity_cache import MouseConnectivityCache
File "/opt/miniconda/lib/python3.7/site-packages/allensdk/core/__init__.py", line 37, in <module>
from ._data_object_base.data_object import DataObject # noqa F401
File "/opt/miniconda/lib/python3.7/site-packages/allensdk/core/_data_object_base/data_object.py", line 6, in <module>
from allensdk.brain_observatory.comparison_utils import compare_fields
File "/opt/miniconda/lib/python3.7/site-packages/allensdk/brain_observatory/comparison_utils.py", line 8, in <module>
import xarray as xr
File "/opt/miniconda/lib/python3.7/site-packages/xarray/__init__.py", line 1, in <module>
import pkg_resources
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3248, in <module>
@_call_aside
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3223, in _call_aside
f(*args, **kwargs)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3261, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 617, in _build_master
ws.require(__requires__)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 956, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 820, in resolve
new_requirements = dist.requires(req.extras)[::-1]
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2746, in requires
dm = self._dep_map
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3032, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3042, in _compute_dependencies
reqs.extend(parse_requirements(req))
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3095, in __init__
super(Requirement, self).__init__(requirement_string)
File "/opt/miniconda/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in __init__
raise InvalidRequirement(str(e)) from e
pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected closing RIGHT_PARENTHESIS
fury (>=0.8.0scikit-learn) ; extra == 'all'
~~~~~~~~^
jono3030 commented
The issue was caused by setuptools v67.0.0 which was released three days ago. Downgrading setuptools to v65.6.0 fixes the issue temporarily. In the long run, the affected MIRACL scripts should be refactored to work with setuptools v67.0.0!
For now fixes will be commited to repo and v2.2.2 will be re-released.