FreeTAKTeam / DigitalPy

A framework to support digital engineering in the python language
Eclipse Public License 2.0
8 stars 4 forks source link

ModuleNotFoundError: No module named 'digitalpy.core.security' #47

Closed Hellikandra closed 3 months ago

Hellikandra commented 1 year ago

I am following this page to reset ssl certs : https://freetakteam.github.io/FreeTAKServer-User-Docs/Installation/Troubleshooting/SocketIssue/

When I try this command : python3 -m digitalpy.core.security.crl_regen --ca-pem-path /usr/local/lib/python3.8/dist-packages/FreeTAKServer/certs/ca.pem --ca-key-path /usr/local/lib/python3.8/dist-packages/FreeTAKServer/certs/ca.key --crl-path /usr/local/lib/python3.8/dist-packages/FreeTAKServer/certs/FTS_CRL.json

python return : /usr/bin/python3: Error while finding module specification for 'digitalpy.core.security.crl_regen' (ModuleNotFoundError: No module named 'digitalpy.core.security')

by looking in the site-package, the folder security does not exist. by looking in source code in release tag : security folder does not exist by looking in pypi website : the tar does not have the security folder.

brothercorvo commented 1 year ago

Are you using fts 2.0? In this case probably you have python 3.11

Hellikandra commented 1 year ago

FTS 1.9.5 and Python3.8 I also try in Python3.6 directly by using only python3 -m digitalpy.core.security.crl_regen. and python return the same error.

brothercorvo commented 1 year ago

The fix has been developed for fts 2.0. We have also tested it with 1.9.9.6 but you run a real old version and er suggest to update

Hellikandra commented 1 year ago

I am sorry but I do not understand the link between the error from python and modules/packages and the need to update FTS.

In my sens, python error which said /usr/bin/python3: Error while finding module specification for 'digitalpy.core.security.crl_regen' (ModuleNotFoundError: No module named 'digitalpy.core.security') is not linked to the version of FTS due to the fact that it's depend on the DigitalPy package and not FTS package.

Hellikandra commented 1 year ago

After doing some manipulation, digitalpy works only if I download directly from git and not from pip.

brothercorvo commented 1 year ago

This is strange because we use pip to install FTS

brothercorvo commented 1 year ago

@naman108 can you verify?

brothercorvo commented 10 months ago

@naman108 verify the published Pip has the sec package

naman108 commented 3 months ago

I can confirm that this is fixed in the current version of fts and can be executed as follows within the venv

(fts.venv) root@DevServer:~# python -m digitalpy.core.security.crl_regen --ca-pem-path /opt/fts/certs/ca.pem --ca-key-path /opt/fts/certs/ca.key --crl-path /opt/fts/certs/FTS_CRL.json