Traceback:
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.4/contextlib.py" in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/contrib/admin/sites.py" in inner
return view(request, *args, **kwargs)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/admin.py" in process_import
user=request.user)
File "/usr/lib/python3.4/contextlib.py" in inner
return func(*args, **kwds)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/resources.py" in import_data
six.reraise(*sys.exc_info())
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/utils/six.py" in reraise
raise value
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/resources.py" in import_data
self.save_m2m(instance, row, real_dry_run)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/resources.py" in save_m2m
self.import_field(field, obj, data)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/resources.py" in import_field
field.save(obj, data)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/import_export/fields.py" in save
setattr(obj, attrs[-1], self.clean(data))
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/fields/related.py" in set
"intermediary model. Use %s.%s's Manager instead." % (opts.app_label, opts.object_name)
Exception Type: AttributeError at /data_center/rack/process_import/
Exception Value: Cannot set values on a ManyToManyField which specifies an intermediary model. Use data_center.RackAccessory's Manager instead.
could you please help take a look where the issue is and how to fix it ?
Expected behavior
file should be imported.
Actual behavior
file failed importing
Environment
root@ip-172-31-27-166:/opt/ralph/ralph-core/bin# dpkg -l "ralph"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================================-========================-========================-====================================================================================
ii ralph-core 3.0.0-snapshot-20181109- amd64 Ralph is an DCIM/CMDB - asset management for Data Centers/ Back Office.
Steps to reproduce
hi, i've encountered issue while try to import document(csv,json,xls)
Django Version: 1.8.19 Python Version: 3.4.3 Installed Applications: ('ralph.admin', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_rq', 'import_export', 'mptt', 'reversion', 'sitetree', 'ralph.accounts', 'ralph.assets', 'ralph.attachments', 'ralph.back_office', 'ralph.configuration_management', 'ralph.dashboards', 'ralph.data_center', 'ralph.dhcp', 'ralph.deployment', 'ralph.licences', 'ralph.domains', 'ralph.trade_marks', 'ralph.supports', 'ralph.security', 'ralph.lib.foundation', 'ralph.lib.table', 'ralph.networks', 'ralph.data_importer', 'ralph.dc_view', 'ralph.reports', 'ralph.virtual', 'ralph.operations', 'ralph.lib.external_services', 'ralph.lib.transitions', 'ralph.lib.permissions', 'ralph.lib.custom_fields', 'ralph.lib.hooks', 'ralph.notifications', 'ralph.ssl_certificates', 'rest_framework', 'rest_framework.authtoken', 'taggit', 'taggit_serializer') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'threadlocals.middleware.ThreadLocalMiddleware')
Traceback: File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
Exception Type: AttributeError at /data_center/rack/process_import/ Exception Value: Cannot set values on a ManyToManyField which specifies an intermediary model. Use data_center.RackAccessory's Manager instead.
could you please help take a look where the issue is and how to fix it ?
Expected behavior
file should be imported.
Actual behavior
file failed importing
Environment
root@ip-172-31-27-166:/opt/ralph/ralph-core/bin# dpkg -l "ralph" Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=======================================-========================-========================-==================================================================================== ii ralph-core 3.0.0-snapshot-20181109- amd64 Ralph is an DCIM/CMDB - asset management for Data Centers/ Back Office.