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

Error encountered when mapping npm Package #65

Open
JonoYang opened this issue Apr 12, 2023 · 0 comments
Open

Error encountered when mapping npm Package #65

JonoYang opened this issue Apr 12, 2023 · 0 comments

Comments

@JonoYang
Copy link
Member

ERROR:minecode.management.commands.run_map:Error: Failed to map while processing ResourceURI: <ResourceURI: https://registry.npmjs.org/rendition>
While processing scanned_package: PackageData(type='npm', namespace=None, name='rendition', version='21.4.7-fix-download-image-modal-alignment-when-no-compatible-device-types-00a8743f9a62aa7bf03fc63e4f9d84c1c1c3ba77', datasource_id='npm_package_json')
DataError DataError('value too long for type character varying(100)\n')
Traceback (most recent call last):
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, 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 "/home/jono/nexb/src/purldb/minecode/management/commands/run_map.py", line 288, in map_uri
    created_package = Package.objects.create(**package_data)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/query.py", line 671, in create
    obj.save(force_insert=True, using=self.db)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/base.py", line 812, in save
    self.save_base(
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/base.py", line 863, in save_base
    updated = self._save_table(
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1006, in _save_table
    results = self._do_insert(
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1047, in _do_insert
    return manager._insert(
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1790, in _insert
    return query.get_compiler(using=using).execute_sql(returning_fields)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1660, in execute_sql
    cursor.execute(sql, params)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/jono/nexb/src/purldb/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(100)
johnmhoran added a commit that referenced this issue Jun 8, 2024
Reference:

Signed-off-by: John M. Horan <[email protected]>
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

1 participant