mlafarga/raccoon

Cannot import name 'ccflibfort'

Opened this issue · 2 comments

Marina, do you know what could be the origin of this error? The installation seemed to be without problems...

Traceback (most recent call last):
  File "/usr/local/bin/raccoonmask", line 33, in <module>
    sys.exit(load_entry_point('raccoon==0.0.1', 'console_scripts', 'raccoonmask')())
  File "/usr/local/bin/raccoonmask", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/rluque/Documents/raccoon/raccoon/__init__.py", line 2, in <module>
    from . import ccf
  File "/Users/rluque/Documents/raccoon/raccoon/ccf.py", line 20, in <module>
    from . import ccflibfort
ImportError: cannot import name 'ccflibfort' from partially initialized module 'raccoon' (most likely due to a circular import) (/Users/rluque/Documents/raccoon/raccoon/__init__.py)```

Hi Rafa,
There's a fortran module that can give some problems. I get the same error as you if I run the code from inside the "raccoon" folder, but it works if I run it from somewhere else. Could you try that and let me know?

Indeed, running raccoonmask -h or raccoonccf -h outside the folder I can see the output without any problems. I will try now with some examples if everything works fine. Thanks!!