harvest-project / harvest

End-to-end user friendly and scalable torrenting server
Apache License 2.0
10 stars 3 forks source link

Error when viewing torrents page #9

Open 2600box opened 5 years ago

2600box commented 5 years ago

Installed on Debian 10 with Python 3.7. I can download a torrent, but viewing Torrents page causes an error. It references bibliotic specifically even though I have only added red torrents.

The following is the error in GUI: Failed to load torrents: Server returned 500 Internal Server Error

and this is what appears in the harvest terminal output.

2019-05-03 00:19:03,188 - django.request - ERROR - Internal Server Error: /api/torrents/
Traceback (most recent call last):
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/harvest/harvest/Harvest/utils.py", line 45, in dispatch
    response = super().dispatch(request, *args, **kwargs)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/views.py", line 495, in dispatch
    response = self.handle_exception(exc)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/views.py", line 455, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/views.py", line 492, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/generics.py", line 201, in get
    return self.list(request, *args, **kwargs)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/mixins.py", line 45, in list
    return self.get_paginated_response(serializer.data)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 768, in data
    ret = super(ListSerializer, self).data
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 262, in data
    self._data = self.to_representation(self.instance)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 686, in to_representation
    self.child.to_representation(item) for item in iterable
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 686, in <listcomp>
    self.child.to_representation(item) for item in iterable
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/home/harvest/harvest/venv/lib/python3.7/site-packages/rest_framework/fields.py", line 1889, in to_representation
    return method(value)
  File "/home/harvest/harvest/torrents/serializers.py", line 48, in get_metadata
    self._ensure_metadata_serializers_by_realm_id()
  File "/home/harvest/harvest/torrents/serializers.py", line 34, in _ensure_metadata_serializers_by_realm_id
    realm = realms_by_name[tracker.name]
KeyError: 'bibliotik'
2600box commented 5 years ago

I guess this is related to this error when starting alcazard

2019-05-03 06:57:52,433 - host - INFO - Starting alcazard with state at state/.
In file included from /home/harvest/harvest/alcazard/libtorrent_impl/speedups/SqliteHelper.cpp:1:
/home/harvest/harvest/alcazard/libtorrent_impl/speedups/SqliteHelper.hpp:6:10: fatal error: sqlite3.h: No such file or directory
 #include <sqlite3.h>
          ^~~~~~~~~~~
compilation terminated.
2019-05-03 06:57:55,527 - clients - WARNING - Unable import managed_libtorrent: Building module libtorrent_impl.speedups.session failed: ["distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n"].
2019-05-03 06:57:55,533 - transmission.managed_transmission - INFO - Starting transmission-daemon for managed_transmission001
2019-05-03 06:57:55,635 - clients - INFO - Launching managed_transmission001

which was resolved with apt-get install libsqlite3-dev

now I only have this error:

2019-05-03 07:00:56,322 - host - INFO - Starting alcazard with state at state/.
/home/harvest/harvest/alcazard/libtorrent_impl/speedups/TorrentState.cpp:3:10: fatal error: libtorrent/torrent_status.hpp: No such file or directory
 #include <libtorrent/torrent_status.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
2019-05-03 07:01:00,525 - clients - WARNING - Unable import managed_libtorrent: Building module libtorrent_impl.speedups.session failed: ["distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1\n"].
2019-05-03 07:01:00,534 - transmission.managed_transmission - INFO - Starting transmission-daemon for managed_transmission001
2019-05-03 07:01:00,544 - clients - INFO - Launching managed_transmission001
======== Running on http://0.0.0.0:7001 ========
(Press CTRL+C to quit)