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

Cannot open tractor-sdss-synth.py #102

Open
dampach opened this issue Dec 15, 2022 · 9 comments
Open

Cannot open tractor-sdss-synth.py #102

dampach opened this issue Dec 15, 2022 · 9 comments

Comments

@dampach
Copy link

dampach commented Dec 15, 2022

I just installed tractor and tried to open the example (tractor-sdss-synth.py
), but I get this error:

Traceback (most recent call last):
  File "test_tractor.py", line 8, in <module>
    from tractor import *
  File "/home/dampach/.local/lib/python3.7/site-packages/tractor/__init__.py", line 1, in <module>
    from .engine import *
  File "/home/dampach/.local/lib/python3.7/site-packages/tractor/engine.py", line 18, in <module>
    from tractor.utils import MultiParams, _isint, get_class_from_name
ImportError: cannot import name 'MultiParams' from 'tractor.utils' (/home/dampach/.local/lib/python3.7/site-packages/tractor/utils/__init__.py)
@dstndstn
Copy link
Owner

Can you please list all the commands you ran before this happened. Did you install it? Or are you running from a git checkout of the code? Because that error is coming from an installed version, but I still don't see what the problem is.

@dampach
Copy link
Author

dampach commented Dec 16, 2022

I tried installing it with both options

wget -O - https://raw.github.com/dstndstn/tractor/master/checkout.sh | bash

and then

make
python setup.py install

sorry if its a foolish question and thanks in advance.

@dstndstn
Copy link
Owner

That's reasonable... and then what's the python command you're running to run that test?

@dampach
Copy link
Author

dampach commented Dec 16, 2022

python examples/tractor-sdss-synth.py

just like the README.md says

@dstndstn
Copy link
Owner

Okay... I asked because the stack trace you sent above it starts with

Traceback (most recent call last):
  File "test_tractor.py", line 8, in <module>
    from tractor import *

Wait, something is weird.

It says it's trying to read from
/home/dampach/.local/lib/python3.7/site-packages/tractor/utils/init.py

but there's... no such file in the tractor repository. There's a tractor/utils.py, but not a tractor/utils directory. Are you sure that that /home/dampach/.local/lib/python3.7/site-packages/tractor directory isn't from an old installation or something?

@dampach
Copy link
Author

dampach commented Dec 16, 2022

Yeah, Im sure it's not an old installation because I just started with Tractor. I just realized there is a folder named utils that have an empty __init__.py file. Maybe that´s why?

@dstndstn
Copy link
Owner

Exactly, that's the problem, but where did it come from?

@dampach
Copy link
Author

dampach commented Dec 16, 2022

I just don´t know xd. But I tried changing the name of this utils folder and looks like that was the problem, because now I get an error from astrometry

@dstndstn
Copy link
Owner

Hooray, a different error :)

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