Closed Vinchethescript closed 4 years ago
This project is pretty much abandoned, so I'm not sure what the current state of things are. It's likely to be a missing path that is making it fail to run, but if you can copy/paste any output that it gives, I might be able to give a bit more direction.
The problem is: when i try to start TitleDB, it doesn't give me output
Fwiw, I didn't ever use any kind of start.py script to bring things up, I was using the systemd service file under https://github.com/ksanislo/TitleDB/blob/master/extras/systemd/titledb%40.service
Can you start it with that, or at least the command line as that uses and see what it does?
what should I type on cmd to start it?
You need to first set up some pip magic with:
pip install -e .
You might need to use pip3 instead of pip depending on your distro.
Then you can start it up with:
pserve /path/to/TitleDB/production.ini http_port=8080 db_password=
Filling in your own MySQL database password and an auth secret of your choosing.
mysqlclient
, i tried to install it with pip or pip3 but it doesnt install
Error using pip:
`vincysuper@ns37897:/var/www/nginx/TitleDB$ pip install mysqlclient
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hcFjY8/mysqlclient/setup.py'"'"'; file='"'"'/tmp/pip-install-hcFjY8/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-hcFjY8/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-hcFjY8/mysqlclient/
Complete output (12 lines):
sh: mysql_config: command not found
sh: mariadb_config: command not found
sh: mysql_config: command not found
Traceback (most recent call last):
File "ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. vincysuper@ns37897:/var/www/nginx/TitleDB$` Error using pip3:
Collecting mysqlclient
Cache entry deserialization failed, entry ignored
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jzjfa2ci/mysqlclient/ What can i do to fix this?
That last error almost looks like MySQL or mariadb isn’t actually installed itself, as it is complaining of missing a setup script for either of them.
I fixed, now this is my error when i try to start it: File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/path.py", line 395, in _zope_dottedname_style found = getattr(found, n) AttributeError: module 'titledb' has no attribute 'resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pserve", line 11, in
That final " No module named 'titledb.resources' " bit makes me believe that the pip3 install -e .
part wasn't done correctly somehow. You may need to re-run that command from the root of wherever the TDB codebase is at, as it registers the "." (current working directory when it was run) path as a source for modules to be loaded from later.
I retried that command and this is the output: vincysuper@ns37897:/var/www/nginx/TitleDB$ pip3 install -e . Obtaining file:///var/www/nginx/TitleDB Requirement already satisfied: pyramid in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (1.10.4) Requirement already satisfied: pyramid_chameleon in /usr/local/lib/python3.5/dist-packages/pyramid_chameleon-0.3-py3.5.egg (from titledb==0.9.14) (0.3) Requirement already satisfied: pyramid_debugtoolbar in /usr/local/lib/python3.5/dist-packages/pyramid_debugtoolbar-4.5.1-py3.5.egg (from titledb==0.9.14) (4.5.1) Requirement already satisfied: numpy in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (1.16.5) Requirement already satisfied: marshmallow in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (2.20.5) Requirement already satisfied: deform in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (2.0.8) Requirement already satisfied: sqlalchemy in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (1.3.11) Requirement already satisfied: pyramid_tm in /usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg (from titledb==0.9.14) (2.3) Requirement already satisfied: pillow in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (6.2.1) Requirement already satisfied: bcrypt in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (3.1.7) Requirement already satisfied: waitress in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (1.3.1) Requirement already satisfied: rarfile in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (3.1) Requirement already satisfied: libarchive-c in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (2.9) Requirement already satisfied: zope.sqlalchemy in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (1.2) Requirement already satisfied: mysqlclient in /usr/local/lib/python3.5/dist-packages/mysqlclient-2.0.0.dev1-py3.5-linux-x86_64.egg (from titledb==0.9.14) (2.0.0.dev1)Requirement already satisfied: requests in /home/vincysuper/.local/lib/python3.5/site-packages (from titledb==0.9.14) (2.22.0) Requirement already satisfied: hupper>=1.5 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (1.9.1) Requirement already satisfied: zope.interface>=3.8.0 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (4.7.1) Requirement already satisfied: venusian>=1.0 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (2.1.0) Requirement already satisfied: zope.deprecation>=3.5.0 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (4.4.0) Requirement already satisfied: setuptools in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (44.0.0) Requirement already satisfied: translationstring>=0.4 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (1.3) Requirement already satisfied: webob>=1.8.3 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (1.8.5) Requirement already satisfied: plaster-pastedeploy in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (0.7) Requirement already satisfied: plaster in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid->titledb==0.9.14) (1.0) Requirement already satisfied: Chameleon in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid_chameleon->titledb==0.9.14) (3.6.2) Requirement already satisfied: Pygments in /usr/local/lib/python3.5/dist-packages (from pyramid_debugtoolbar->titledb==0.9.14) (2.5.2) Requirement already satisfied: pyramid_mako>=0.3.1 in /usr/local/lib/python3.5/dist-packages (from pyramid_debugtoolbar->titledb==0.9.14) (1.1.0) Requirement already satisfied: repoze.lru in /usr/local/lib/python3.5/dist-packages (from pyramid_debugtoolbar->titledb==0.9.14) (0.7) Requirement already satisfied: peppercorn>=0.3 in /home/vincysuper/.local/lib/python3.5/site-packages (from deform->titledb==0.9.14) (0.6) Requirement already satisfied: iso8601 in /home/vincysuper/.local/lib/python3.5/site-packages (from deform->titledb==0.9.14) (0.1.12) Requirement already satisfied: colander>=1.0a1 in /home/vincysuper/.local/lib/python3.5/site-packages (from deform->titledb==0.9.14) (1.7.0) Requirement already satisfied: transaction>=2.0 in /home/vincysuper/.local/lib/python3.5/site-packages (from pyramid_tm->titledb==0.9.14) (2.4.0) Requirement already satisfied: six>=1.4.1 in /home/vincysuper/.local/lib/python3.5/site-packages (from bcrypt->titledb==0.9.14) (1.13.0) Requirement already satisfied: cffi>=1.1 in /home/vincysuper/.local/lib/python3.5/site-packages (from bcrypt->titledb==0.9.14) (1.13.2) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/vincysuper/.local/lib/python3.5/site-packages (from requests->titledb==0.9.14) (3.0.4) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/vincysuper/.local/lib/python3.5/site-packages (from requests->titledb==0.9.14) (1.25.6) Requirement already satisfied: certifi>=2017.4.17 in /home/vincysuper/.local/lib/python3.5/site-packages (from requests->titledb==0.9.14) (2019.9.11) Requirement already satisfied: idna<2.9,>=2.5 in /home/vincysuper/.local/lib/python3.5/site-packages (from requests->titledb==0.9.14) (2.8) Requirement already satisfied: PasteDeploy>=2.0 in /home/vincysuper/.local/lib/python3.5/site-packages (from plaster-pastedeploy->pyramid->titledb==0.9.14) (2.0.1) Requirement already satisfied: Mako>=1.1.0 in /usr/local/lib/python3.5/dist-packages (from pyramid_mako>=0.3.1->pyramid_debugtoolbar->titledb==0.9.14) (1.1.0) Requirement already satisfied: pycparser in /home/vincysuper/.local/lib/python3.5/site-packages (from cffi>=1.1->bcrypt->titledb==0.9.14) (2.19) Requirement already satisfied: MarkupSafe>=0.9.2 in /usr/local/lib/python3.5/dist-packages (from Mako>=1.1.0->pyramid_mako>=0.3.1->pyramid_debugtoolbar->titledb==0.9.14) (1.1.1) Installing collected packages: titledb Found existing installation: titledb 0.9.14 Can't uninstall 'titledb'. No files were found to uninstall. Running setup.py develop for titledb ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/www/nginx/TitleDB/setup.py'"'"'; file='"'"'/var/www/nginx/TitleDB/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /var/www/nginx/TitleDB/ Complete output (31 lines): fatal: No annotated tags can describe 'd68addd45adafcb36afdc20567e875a659f36669'. However, there were unannotated tags: try --tags.
__version__= 0.9.14
running develop
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/test-easy-install-14814.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.5/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
----------------------------------------
ERROR: Can't roll back titledb; was not uninstalled ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/www/nginx/TitleDB/setup.py'"'"'; __file__='"'"'/var/www/nginx/TitleDB/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
You might need to sudo pip3 install -e .
so it has perms for what it is trying to do still..
The command worked, but the error is the same
The same error being "module 'titledb' has no attribute 'resources'"? Is /var/www/nginx/TitleDB/ the checkout path for the GitHub repo? Does it contain another "titledb" folder inside that has the resources.py file in it still?
The error was "No module named titledb.resources" and yes, there is a "titledb" folder in /var/www/nginx/TitleDB (so /var/www/nginx/TitleDB/titledb)
I fixed, nginx's (and titledb?) port is 4989, now this is my output:
Starting server in PID 16357.
Traceback (most recent call last):
File "/usr/local/bin/pserve", line 11, in <module>
sys.exit(main())
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/scripts/pserve.py", line 34, in main
return command.run()
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/scripts/pserve.py", line 285, in run
server(app)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/loadwsgi.py", line 195, in server_wrapper
**context.local_conf)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/__init__.py", line 20, in serve_paste
serve(app, **kw)
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/__init__.py", line 11, in serve
server = _server(app, **kw)
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/server.py", line 85, in create_server
sockinfo=sockinfo)
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/server.py", line 229, in __init__
self.bind_server_socket()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/server.py", line 360, in bind_server_socket
self.bind(sockaddr)
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/wasyncore.py", line 369, in bind
return self.socket.bind(addr)
OSError: [Errno 98] Address already in use```
Perhaps you already have a copy started in the background accidentally or something? You can quickly check to see what is listening on that port with lsof
, using a command like lsof -ni | grep 4989
to just limit the output to lines containing that number...
No output
Strange.. it must be failing to parse the http_port variable when processing production.ini ... You can edit the production.ini (or staging.ini or development.ini depending on what environment you are trying to start up) and replace the %(variablename)s parts with their real values so you don't have to define them all on startup. The only reason they were using variables was so I didn't have to check my password and stuff into the source repo and share it online.
You might want to consider starting with using the development.ini launcher instead of production.ini just so you get more useful debug output while setting it up.
Keep in mind, when these start, they're either using wsgiref (for development) or waitress (for staging and production) to make what is effectively a web server itself. This doesn't run under nginx directly. Once you have it operational, you then configure nginx as a reverse proxy between your outside facing address on a standard http:// port 80 or https:// on 443, which forwards all requests to the titledb API which is running on it's own internal port. You can do all your local testing against that internal port first though, you don't need to get nginx involved at all until you're ready to deploy it as a full site.
Mind if I ask what you're trying to actually accomplish with this? Unless you're wanting to produce a reproduction of what titledb used to be, there might be a better way to accomplish your goal.
I changed port to 8080, now api is up, i tested it with a game, it redirects me to api (i changed redirect), the site gives me an internal server error and in the output comes this:
Starting server in PID 25783.
Serving on http://0.0.0.0:8080
2020-01-04 06:14:53,225 ERROR [waitress][waitress] Exception while serving /v0/
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 779, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/channel.py", line 356, in service
task.service()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 172, in service
self.execute()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 440, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/config.py", line 291, in __call__
return self.app(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 778, in invoke_exception_view
reraise_(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 178, in tm_tween
reraise(*exc_info)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 143, in tm_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 667, in _call_view
response = view_callable(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 116, in _class_requestonly_view
response = getattr(inst, attr)()
File "/var/www/nginx/TitleDB/titledb/views.py", line 362, in legacy_list_v0
sq = DBSession.query(CIA.entry_id, CIA.titleid, func.min(CIA.created_at).label('mca')).group_by(CIA.titleid).subquery()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/_collections.py", line 1047, in __call__
val = self.registry.value = self.createfunc()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 3225, in __call__
return self.class_(**local_kw)
File "<string>", line 2, in __init__
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/deprecations.py", line 128, in warned
return fn(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 854, in __init__
SessionExtension._adapt_listener(self, ext)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/deprecated_interfaces.py", line 367, in _adapt_listener
ls_meth = getattr(listener, meth)
AttributeError: 'ZopeTransactionEvents' object has no attribute 'after_commit'
2020-01-04 06:16:35,899 ERROR [waitress][waitress] Exception while serving /v0/
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 779, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/channel.py", line 356, in service
task.service()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 172, in service
self.execute()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 440, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/config.py", line 291, in __call__
return self.app(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 778, in invoke_exception_view
reraise_(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 178, in tm_tween
reraise(*exc_info)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 143, in tm_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 667, in _call_view
response = view_callable(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 116, in _class_requestonly_view
response = getattr(inst, attr)()
File "/var/www/nginx/TitleDB/titledb/views.py", line 362, in legacy_list_v0
sq = DBSession.query(CIA.entry_id, CIA.titleid, func.min(CIA.created_at).label('mca')).group_by(CIA.titleid).subquery()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/_collections.py", line 1047, in __call__
val = self.registry.value = self.createfunc()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 3225, in __call__
return self.class_(**local_kw)
File "<string>", line 2, in __init__
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/deprecations.py", line 128, in warned
return fn(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 854, in __init__
SessionExtension._adapt_listener(self, ext)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/deprecated_interfaces.py", line 367, in _adapt_listener
ls_meth = getattr(listener, meth)
AttributeError: 'ZopeTransactionEvents' object has no attribute 'after_commit'
2020-01-04 06:17:48,451 ERROR [waitress][waitress] Exception while serving /v0/
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 779, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/channel.py", line 356, in service
task.service()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 172, in service
self.execute()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 440, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/config.py", line 291, in __call__
return self.app(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 778, in invoke_exception_view
reraise_(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 178, in tm_tween
reraise(*exc_info)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 143, in tm_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 667, in _call_view
response = view_callable(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 116, in _class_requestonly_view
response = getattr(inst, attr)()
File "/var/www/nginx/TitleDB/titledb/views.py", line 362, in legacy_list_v0
sq = DBSession.query(CIA.entry_id, CIA.titleid, func.min(CIA.created_at).label('mca')).group_by(CIA.titleid).subquery()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/_collections.py", line 1047, in __call__
val = self.registry.value = self.createfunc()
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 3225, in __call__
return self.class_(**local_kw)
File "<string>", line 2, in __init__
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/util/deprecations.py", line 128, in warned
return fn(*args, **kwargs)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 854, in __init__
SessionExtension._adapt_listener(self, ext)
File "/home/vincysuper/.local/lib/python3.5/site-packages/sqlalchemy/orm/deprecated_interfaces.py", line 367, in _adapt_listener
ls_meth = getattr(listener, meth)
AttributeError: 'ZopeTransactionEvents' object has no attribute 'after_commit'
2020-01-04 06:17:53,242 ERROR [waitress][waitress] Exception while serving /v0/
Traceback (most recent call last):
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/channel.py", line 356, in service
task.service()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 172, in service
self.execute()
File "/home/vincysuper/.local/lib/python3.5/site-packages/waitress/task.py", line 440, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/paste/deploy/config.py", line 291, in __call__
return self.app(environ, start_response)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 778, in invoke_exception_view
reraise_(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 178, in tm_tween
reraise(*exc_info)
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/compat.py", line 36, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/pyramid_tm-2.3-py3.5.egg/pyramid_tm/__init__.py", line 143, in tm_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/view.py", line 667, in _call_view
response = view_callable(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
result = view(context, request)
File "/home/vincysuper/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 116, in _class_requestonly_view
response = getattr(inst, attr)()
File "/var/www/nginx/TitleDB/titledb/views.py", line 350, in legacy_list_v0
mydata = json.loads(self.request.body.decode("utf-8"))
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```
In the origin repo, that line (https://github.com/ksanislo/TitleDB/blob/master/titledb/views.py#L350) should only happen when it receives a POST request, so unless something has been tweaked somewhere in your version, it seems you're somehow sending a POST request with no JSON encoded message content to be decoded.
so what can i do?
What are you using as your client that is hitting the service? You should be doing a GET request, and that's not what seems to be happening from the error, so I'm not sure which side is misbehaving.
I dont know, i updated to python 3.8 right now, the error is the same
Without knowledge of the application is looks like some kind of webserver is offline or unreachable. Perhaps you changed something (or not). I can tell by the following lines:
1) pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
2) AttributeError: 'ZopeTransactionEvents' object has no attribute 'after_commit'
3) json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
1 is basically a exception which say to you that the endpoint you try to connect with is blocked/not available/wrong url.
Hope that helps
Edit:
also, when working with any web framework the error message OSError: [Errno 98] Address already in use
most of the times indicate that you already have a service running on the same port. For example flask default port is 5000. When running 2 terminals in visual studio code; 1 will run and the other will throw that exception basically telling you the port is already in use.
Thank you, now how can i fix this?
How can i fix that?
Help?
I'm sorry man, I'm just not sure what it's doing. This wasn't really designed to be run by a third party, so there's a whole lot of things that can be going wrong. You'll need to be able to debug it on your own to really sort it out.
Ah No problem, ill find the problem alone
I cloned api, and when i try to start it (i created start.py) it doesnt work, it stops working when i try to start it