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

ModuleNotFoundError: No module named 'pynetdicom.apps.movescu.echoscp' #950

Closed
davidrs06 opened this issue Jul 22, 2024 · 1 comment · Fixed by #951
Closed

ModuleNotFoundError: No module named 'pynetdicom.apps.movescu.echoscp' #950

davidrs06 opened this issue Jul 22, 2024 · 1 comment · Fixed by #951
Labels

Comments

@davidrs06
Copy link

Hi all,

I think there might be an issue with the installation of the movescuscript. I created a conda environment with only python=3.12, and ran pip install pydicom as well as pip install pynetdicom. When running movescu I get the following error:

Traceback (most recent call last):
  File "~/miniconda3/envs/pydicom_env/bin/movescu", line 5, in <module>
    from pynetdicom.apps.movescu.echoscp import main
ModuleNotFoundError: No module named 'pynetdicom.apps.movescu.echoscp'`

When opening the file ~/miniconda3/envs/pydicom_env/bin/movescu, the file content is:

#!/~/miniconda3/envs/pacs2bids/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pynetdicom.apps.movescu.echoscp import main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

It looks like it's trying to import from an echoscp file in the movescu folder, which doesn't exist in the current version of pynetdicom. I think it might be related to the script installation used here: https://github.com/pydicom/pynetdicom/blob/1d0b1df63037b04f01b9951cabc9d4e6fa602e6d/pyproject.toml#L76C1-L76C8. Could replace pynetdicom.apps.movescu.echoscp:main by pynetdicom.apps.movescu.movescu:main solve the issue ?

@scaramallion
Copy link
Member

Ah, yes you're right. I'm tempted to blame poetry for this but the typo is all mine.

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

Successfully merging a pull request may close this issue.

2 participants