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

[BUG] ImportError after #995 #1000

Closed
HuangJiameng opened this issue Oct 17, 2022 · 2 comments · Fixed by #1001
Closed

[BUG] ImportError after #995 #1000

HuangJiameng opened this issue Oct 17, 2022 · 2 comments · Fixed by #1001
Assignees
Labels
bug Something isn't working

Comments

@HuangJiameng
Copy link
Collaborator

After #995 is merged , from dpgen import __date__ will raise error when executed. When using dpgen -h or any command, the following error message occurs.

(test) [root@bohrium /data/test_dpgen_devel/dpgen]$ dpgen -h
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/usr/local/bin/dpgen", line 5, in <module>
    from dpgen.main import main
  File "/usr/local/lib/python3.8/dist-packages/dpgen/main.py", line 19, in <module>
    from dpgen import info, __version__, __date__
ImportError: cannot import name '__date__' from 'dpgen' (/usr/local/lib/python3.8/dist-packages/dpgen/__init__.py)

Steps to Reproduce

clone the repo, then use

git checkout devel
pip install .
dpgen -h
@HuangJiameng HuangJiameng added the bug Something isn't working label Oct 17, 2022
@HuangJiameng
Copy link
Collaborator Author

@njzjz Could you fix it? Thanks!

@njzjz njzjz self-assigned this Oct 17, 2022
njzjz added a commit to njzjz/dpgen that referenced this issue Oct 17, 2022
@njzjz njzjz mentioned this issue Oct 17, 2022
@njzjz njzjz linked a pull request Oct 17, 2022 that will close this issue
@njzjz
Copy link
Member

njzjz commented Oct 17, 2022

In #1001 I also add a test. Surprised to see there were no tests for dpgen -h.

wanghan-iapcm pushed a commit that referenced this issue Oct 18, 2022
Fixes #1000. Add tests.
@njzjz njzjz closed this as completed Oct 18, 2022
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 a pull request may close this issue.

2 participants