You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a django webapp that uses packageurl.contrib.django.models.PackageURLMixin and I get the following error when I try to save a package with a very long name.
Traceback (most recent call last):
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(100)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/home/jono/nexb/src/dejacode/component_catalog/management/commands/setpurls.py", line 88, in handle
Package.objects.filter(pk=package.pk).update(**package_url_dict)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/models/query.py", line 783, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/jono/nexb/src/dejacode/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(100)
The text was updated successfully, but these errors were encountered:
I have a django webapp that uses
packageurl.contrib.django.models.PackageURLMixin
and I get the following error when I try to save a package with a very long name.The text was updated successfully, but these errors were encountered: