Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmo-generator stopped working from version 1.2.2 to version 2.0 #37

Closed
lukashergt opened this issue Sep 4, 2019 · 1 comment
Closed

Comments

@lukashergt
Copy link
Contributor

The cobaya-cosmo-generator stopped working in version 2.0.

Error message with python2:

Traceback (most recent call last):
  File "/home/lh561/.virtualenvs/py27env/bin/cobaya-cosmo-generator", line 11, in <module>
    load_entry_point('cobaya', 'console_scripts', 'cobaya-cosmo-generator')()
  File "/home/lh561/Documents/Projects/CobayaPrj/cobaya/cobaya/cosmo_input/gui.py", line 291, in gui_script
    window = MainWindow()
  File "/home/lh561/Documents/Projects/CobayaPrj/cobaya/cobaya/cosmo_input/gui.py", line 59, in __init__
    modules = get_available_modules(kind)
  File "/home/lh561/Documents/Projects/CobayaPrj/cobaya/cobaya/tools.py", line 148, in get_available_modules
    if __init__filename and os.path.getsize(__init__with_path):
  File "/home/lh561/.virtualenvs/py27env/lib/python2.7/genericpath.py", line 57, in getsize
    return os.stat(filename).st_size
OSError: [Errno 20] Not a directory: '/home/lh561/Documents/Projects/CobayaPrj/cobaya/cobaya/samplers/__init__.py/__init__.py'
QClipboard: Unable to receive an event from the clipboard manager in a reasonable time

To check whether this might be due to the python version I tried it with python3, but only got:

Segmentation fault

The repetition of /__init__.py seems to cause the problem. Glancing at cobaya/tools.py there were too many changes for me to easily spot what might have caused this, i.e. I guess this'll be easier for those familiar with the changes made.

@JesusTorrado
Copy link
Contributor

JesusTorrado commented Sep 5, 2019

My bad: there was a last minute change that I didn't test in Python 2. Thanks for the report!

Fixed in master, but not uploaded to PyPI yet, so please pull from GitHub.

Also, unless you have a really good reason to use Python 2 (e.g. compatibility with old external code), I'd really recommend you switching to Python 3: end of life of Python 2 is in 4 months!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants