FreeTAKTeam / FreeTAKHub-Installation

FreeTAKHub-Installation
Eclipse Public License 2.0
33 stars 29 forks source link

Issue Starting FreeTAKServer: ModuleNotFoundError for lxml.etree #101

Closed Rainbowrain-TW closed 2 months ago

Rainbowrain-TW commented 7 months ago

I attempted to start FreeTAKServer (FTS) using the following command:

sudo python3 -m FreeTAKServer.controllers.services.FTS

However, I encountered the following error message:

Traceback (most recent call last):
  ...
    from lxml.etree import Element   # pylint: disable=no-name-in-module
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'lxml.etree'

I have already installed lxml using these commands:

sudo apt-get install python3-lxml
# Output: python3-lxml is already the newest version (4.8.0-1build1).
sudo pip3 install lxml
# Output: Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (4.8.0)

I tried commenting out the line from lxml.etree import Element # pylint: disable=no-name-in-module in xml_serializer.py and then restarted FTS. This resulted in the following error:

  File "/usr/local/lib/python3.11/dist-packages/FreeTAKServer/core/serializers/xml_serializer.py", line 6, in <module>
    from lxml import etree
ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3/dist-packages/lxml/__init__.py)

My system environment is as follows (I'm using Windows 10 with WSL):

Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

I have tried following the installation instructions from these three sources, but all attempts have failed:

  1. FreeTAKServer Install On Windows Computer
  2. FreeTAK Server Installation(Linux)
  3. taky

Any advice or suggestions would be greatly appreciated. Thank you in advance for your help.

brothercorvo commented 3 months ago

this should be solved