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

data_path not being found #24

Merged
merged 2 commits into from
Jul 16, 2021

Conversation

joaomcteixeira
Copy link
Member

After #21 I got this error when running defaults.py.

data_path was not being found within dictionary comprehension in defaults.py.

File "/home/joao/github/haddock3/haddock/defaults.py", line 42, in <dictcomp>
    f"trans_vector_{i}": Path(data_path, 'toppar', 'initial_positions', f'trans_vector_{i}')
    NameError: name 'data_path' is not defined

reverting to a for-loop solves the issue. But I am really puzzled by this issue. I don't understand why data_path was not being found inside the dictionary comprehension. Any ideas?

`data_path` was not being found within dictionary comprehension:

```
File "/home/joao/github/haddock3/haddock/defaults.py", line 42, in <dictcomp>
    f"trans_vector_{i}": Path(data_path, 'toppar', 'initial_positions', f'trans_vector_{i}')
    NameError: name 'data_path' is not defined
```

reverting to a for-loop solves the issue.
@joaomcteixeira joaomcteixeira added the bug Something isn't working label Jul 16, 2021
@joaomcteixeira joaomcteixeira self-assigned this Jul 16, 2021
Copy link
Member

@rvhonorato rvhonorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok!

@joaomcteixeira joaomcteixeira merged commit fc2a3af into haddocking:main Jul 16, 2021
@joaomcteixeira joaomcteixeira deleted the datapathbug branch July 16, 2021 20:00
@joaomcteixeira
Copy link
Member Author

Thanks. In the future I will refact that file. Likely no need for that class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants