FreeTAKTeam / DigitalPy

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

Issues with DigitalPy on both way of installation zero touch and pip install (No module named 'Catalog') #58

Closed PaulKapustsin closed 2 weeks ago

PaulKapustsin commented 1 year ago

Hi, honestly I tried to fix this issue and not to ask the FreeTak team, but I have no other option how to solve this issue. AWS Ubuntu 22.04 Python 3.11 when i start the service i received the following errors, i tried to run it on virtual env and without it, the result is always the same. I am not expereienced person in python, but i checked source code and found out that all this issues are related to digitalpy and the imports inside the project.

image

I tried to reinstall this package also i tried older versions but it didn't end well. I even tried to install this package from git repositories ( sudo pip install git+https://github.com/FreeTAKTeam/DigitalPy.git )

the interesting thing here is that some parts of freetakserver work, and fortunately i don't have issues with FreeTakUI :) but this error made me crazy

Errors log /my_project$ sudo venv/bin/python3 venv/lib/python3.11/site-packages/FreeTAKServer/controllers/services/FTS.py CA found locally, not generating a new one Certificate file exists, aborting. Certificate file exists, aborting. failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/translation, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/network, with error: name 'Facade' is not defined failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/component_management, with error: module 'digitalpy.core.component_management.component_management_facade' has no attribute 'ComponentManagement' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/logic, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/util, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/persistence, with error: module 'digitalpy.core.persistence.persistence_facade' has no attribute 'Persistence' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/zmanager, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/queries, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/telemetry, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/digitalpy/core/health, with error: No module named 'Catalog' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/FreeTAKServer/core/domain, with error: module 'FreeTAKServer.core.domain.domain_facade' has no attribute 'Domain' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/FreeTAKServer/core/fts_core, with error: module 'FreeTAKServer.core.fts_core.fts_core_facade' has no attribute 'FtsCore' failed to register component: /home/ubuntu/my_project/venv/lib/python3.11/site-packages/FreeTAKServer/core/data_package, with error: module 'FreeTAKServer.core.data_package.data_package_facade' has no attribute 'DataPackage'

brothercorvo commented 1 year ago

@PaulKapustsin those import errors have no impact for FTS to work properly, so you can ignore them @naman108 I think all of those are already addressed in the current codebase.

PeterSprague commented 8 months ago

@brothercorvo - "I think all of those are already addressed in the current codebase."

I'm using the master branch source of FreeTAKServer to install, and these errors continue to show when start the FreeTAKServer.

I also used pip to build digitalpy from source after flushing digitalpy. Continues to display same errors re Catalog missing

brothercorvo commented 8 months ago

As described above those errors will not impact the functionality. Besides installing from source is suggested for development only. If you are a regular user you may want to use pip or zerotouch

PeterSprague commented 8 months ago

@brothcorovo Not to hijack the issue report, but installing to a FreeBSD jail, and just using pip install caused it to barf on setup.py: "PyYAML==6.0"

git cloned and upped the PyYAML to 6.0.1, so I would call that personal development. In retrospect, I likely could have used pip install to build PyYAML version 6.0 from source, then proceeded.

naman108 commented 6 months ago

Regarding the central issue of the persistent warning messages this is digitalpy not fts so I'll move this issue to digitalpy and create a branch to address it. This is a minor issue as, while it's certainly annoying and confusing, it has no impact on technical functionality. In terms of PyYAML, this has been problematic for a time now, however I believe the latest version of the Zero-Touch installer handles it.

naman108 commented 2 weeks ago

We've now fixed this issue by preventing these invalid components from being registered.