FreeTAKTeam / FreeTakServer

Situational Awareness Server compatible with TAK clients
Eclipse Public License 2.0
674 stars 170 forks source link

i,m new and.... no conect!!!!! :-( #96

Closed nodojh closed 3 years ago

nodojh commented 4 years ago

I install the server but I try conect......

pi@raspberrypi:~ $ sudo python3 -m FreeTAKServer.controllers.services.FTS Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 364, in connect return _ConnectionFairy._checkout(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 778, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 495, in checkout rec = pool._do_get() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/impl.py", line 241, in _do_get return self._create_connection() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 309, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 440, in init self.connect(first_connect_check=True) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 661, in connect pool.logger.debug("Error on connect(): %s", e) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in exit with_traceback=exctb, File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/compat.py", line 182, in raise raise exception File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 656, in __connect connection = pool._invoke_creator(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/default.py", line 493, in connect return self.dbapi.connect(cargs, **cparams) sqlite3.OperationalError: unable to open database file

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/services/FTS.py", line 5, in from FreeTAKServer.controllers.services.DataPackageServer import FlaskFunctions File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/services/DataPackageServer.py", line 23, in dbController = DatabaseController() File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/DatabaseControllers/DatabaseController.py", line 40, in init self.engine = self.create_engine() File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/DatabaseControllers/DatabaseController.py", line 57, in create_engine Base.metadata.create_all(engine) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/sql/schema.py", line 4554, in create_all ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2094, in _run_visitor with self._optional_conn_ctx_manager(connection) as conn: File "/usr/lib/python3.7/contextlib.py", line 112, in enter return next(self.gen) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2086, in _optional_conn_ctx_manager with self._contextual_connect() as conn: File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2302, in _contextual_connect self._wrap_pool_connect(self.pool.connect, None), File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2340, in _wrap_pool_connect e, dialect, self File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _handle_dbapi_exception_noconnection sqlalchemy_exception, with_traceback=excinfo[2], from=e File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_ raise exception File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 364, in connect return _ConnectionFairy._checkout(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 778, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 495, in checkout rec = pool._do_get() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/impl.py", line 241, in _do_get return self._create_connection() File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 309, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 440, in init self.connect(first_connect_check=True) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 661, in connect pool.logger.debug("Error on connect(): %s", e) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/langhelpers.py", line 70, in exit with_traceback=exctb, File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/util/compat.py", line 182, in raise raise exception File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/pool/base.py", line 656, in __connect connection = pool._invoke_creator(self) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/default.py", line 493, in connect return self.dbapi.connect(cargs, **cparams) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/13/e3q8)

brothercorvo commented 4 years ago

before the first startup go to the installation dir and the FreeTAKServer/controllers/configuration/MainConfig.py here change as follows,

from:

DBFilePath = str(currentPath + r'\FTSDataBase.db') to:

DBFilePath = str('/a/dir/to/store/the/db/FTSDataBase.db')

nodojh commented 4 years ago

thank!! But another problem afraid me.... pi@raspberrypi:~ $ sudo python3 -m FreeTAKServer.controllers.services.FTS Creating directory at logs Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/services/FTS.py", line 9, in from FreeTAKServer.controllers.services.RestAPI import RestAPI File "/usr/local/lib/python3.7/dist-packages/FreeTAKServer/controllers/services/RestAPI.py", line 5, in from lxml import etree ImportError: libxslt.so.1: cannot open shared object file: No such file or directory

naman108 commented 3 years ago

try pip install lxml

naman108 commented 3 years ago

did the pip installation solve your problem?

brothercorvo commented 3 years ago

it looks like user error, not anymore relevant. Closing it