Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'downloadUrl' #29

Open
Horridge opened this issue Sep 7, 2023 · 3 comments
Open

KeyError: 'downloadUrl' #29

Horridge opened this issue Sep 7, 2023 · 3 comments

Comments

@Horridge
Copy link

Horridge commented Sep 7, 2023

Error observed in log, and task proceed_cross_seed is marked as failed; seemingly at random. Will just hang when searching for some items.

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/background_task/tasks.py", line 43, in bg_runner
func(*args, **kwargs)
File "/code/seedcross/crseed/tasks.py", line 83, in backgroundCrossSeedTask
iterTorrents(dlclient, param, log)
File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 466, in iterTorrents
matchingResults = searcher.search(searchData, log, guess_cat=cat)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 114, in search
trim_result = self.loadToIndexResult(result_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 264, in loadToIndexResult
downloadUrl=result['downloadUrl'],
~~~~~~^^^^^^^^^^^^^^^
KeyError: 'downloadUrl'

@chust4
Copy link

chust4 commented Sep 15, 2023

I'm having same issue:

Rescheduling proceed_cross_seed

Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/background_task/tasks.py", line 43, in bg_runner

    func(*args, **kwargs)

  File "/code/seedcross/crseed/tasks.py", line 83, in backgroundCrossSeedTask

    iterTorrents(dlclient, param, log)

  File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 466, in iterTorrents

    matchingResults = searcher.search(searchData, log, guess_cat=cat)

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 114, in search

    trim_result = self.loadToIndexResult(result_json)

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/code/seedcross/crseed/CrossSeedAutoDL.py", line 264, in loadToIndexResult

    downloadUrl=result['downloadUrl'],

                ~~~~~~^^^^^^^^^^^^^^^

KeyError: 'downloadUrl'

Marking task proceed_cross_seed as failed

Also FIX doesn't seems to work:

/media/download/Midsommar.2019.2160p.UHD.BluRay.X265-IAMABLE.mkv  ==>  /media/download/Midsommar.2019.2160p.UHD.BluRay.X265-IAMABLE

Source not exist: [/media/download/Midsommar.2019.2160p.UHD.BluRay.X265-IAMABLE.mkv] 

False : Midsommar.2019.2160p.UHD.BluRay.X265-IAMABLE

It seems like seedcross doesn't see the file, should I mount another volume in docker?

I'm also getting this error sometimes:

Internal Server Error: /crseed/processlog

Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute

    return self.cursor.execute(sql, params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute

    return Database.Cursor.execute(self, query, params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

sqlite3.OperationalError: database is locked

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

Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner

    response = get_response(request)

               ^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 181, in _get_response

    response = wrapped_callback(request, *callback_args, **callback_kwargs)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view

    return view_func(request, *args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/code/seedcross/crseed/views.py", line 333, in ajaxRefreshProcessLog

    log.save()

  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 739, in save

    self.save_base(using=using, force_insert=force_insert,

  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 776, in save_base

    updated = self._save_table(

              ^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 858, in _save_table

    updated = self._do_update(base_qs, using, pk_val, values, update_fields,

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 912, in _do_update

    return filtered._update(values) > 0

           ^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 802, in _update

    return query.get_compiler(self.db).execute_sql(CURSOR)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql

    cursor = super().execute_sql(result_type)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql

    cursor.execute(sql, params)

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 98, in execute

    return super().execute(sql, params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 66, in execute

    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers

    return executor(sql, params, many, context)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 79, in _execute

    with self.db.wrap_database_errors:

  File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 90, in __exit__

    raise dj_exc_value.with_traceback(traceback) from exc_value

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute

    return self.cursor.execute(sql, params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute

    return Database.Cursor.execute(self, query, params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

django.db.utils.OperationalError: database is locked

"GET /crseed/processlog HTTP/1.1" 500 150996

@ccf-2012
Copy link
Owner

don't know why some search return torrent without downloadUrl, any how i add a protection in the code.
commit in the github, not docker.

@erichlf
Copy link

erichlf commented Oct 10, 2024

This is still not in docker. Is there an eta on updating the docker image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants