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

Investigate & Fix errors on file upload #26

Open
mammuth opened this issue Apr 23, 2021 · 1 comment
Open

Investigate & Fix errors on file upload #26

mammuth opened this issue Apr 23, 2021 · 1 comment
Labels

Comments

@mammuth
Copy link
Owner

mammuth commented Apr 23, 2021

According to Sentry, some users experienced errors when uploading their clipping's file.

ValueError: A string literal cannot contain NUL (0x00) characters.

ValueError: A string literal cannot contain NUL (0x00) characters.
(5 additional frame(s) were not displayed)
...
  File "django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
  File "django/db/models/sql/compiler.py", line 889, in execute_sql
    cursor.execute(sql, params)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)

Sentry: https://sentry.io/organizations/personal-c6b/issues/2351272823/?environment=live&project=1488839&referrer=alert_email

Data Error

DoesNotExist: Book matching query does not exist.
  File "django/db/models/query.py", line 464, in get_or_create
    return self.get(**lookup), False
  File "django/db/models/query.py", line 380, in get
    self.model._meta.object_name

DataError: value too long for type character varying(500)

  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)

DataError: value too long for type character varying(500)

(20 additional frame(s) were not displayed)
...
  File "django/db/models/sql/compiler.py", line 1112, in execute_sql
    cursor.execute(sql, params)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)

Sentry: Not accessible anymore (because it's too old I think)

I didn't look into them in detail, but it could be that the whole import failed, or only the import of one book/clipping.

@mammuth mammuth added good first issue Good for newcomers type:bug labels Apr 23, 2021
@mammuth
Copy link
Owner Author

mammuth commented Aug 19, 2021

Another occurrence of this error

ValueError: A string literal cannot contain NUL (0x00) characters.
(7 additional frame(s) were not displayed)
...
  File "django/db/models/base.py", line 963, in _do_insert
    using=using, raw=raw)
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 1079, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "django/db/models/sql/compiler.py", line 1112, in execute_sql
    cursor.execute(sql, params)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)

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

No branches or pull requests

1 participant