question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import results in error for related field

See original GitHub issue

I’ve got a related field that is required for an import, and on 0.4.5 I’m getting an error saying that the “RelatedObjectDoesNotExist” any ideas?

Exception:


Line number: 1 - AssetInventory has no sku.
, rsw001, 1000000.0, SN10000, EX4300-32F, , , , , , , , , , , 42503.0, , , RECEIVED, , , , , ,

Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/import_export/resources.py", line 414, in import_row
row_result.object_repr = force_text(instance)
File "/Library/Python/2.7/site-packages/django/utils/encoding.py", line 78, in force_text
s = six.text_type(s)
File "/Users/acooley/Dropbox (Personal)/Software/Projects/nemesis/asset/models.py", line 23, in __unicode__
return str(self.sku.Type) + " Tag: " + str(self.assetTag)
File "/Library/Python/2.7/site-packages/django/db/models/fields/related_descriptors.py", line 179, in __get__
"%s has no %s." % (self.field.model.__name__, self.field.name)
RelatedObjectDoesNotExist: AssetInventory has no sku.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
int-uacommented, Nov 28, 2017

Fixed in 0.6.0 with #505

1reaction
jschneiercommented, Sep 13, 2016

This should be fixed in master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 'Required fields are missing' when you import records ...
This error occurs when the field in question is a master-detail field, and the field has been mapped during import but contains no...
Read more >
Unknown field error when importing records with Inspector
I export CSV records with Inspector from one sandbox. Problem is when I paste CSV data in Import Records. A lot of fields...
Read more >
CSV Import To Create A Line Item Results in Error Field
When importing line items to a Business Process (BP) record with a data picker, the import fails with the error below. If the...
Read more >
Solved: Error on Import: The following fields have been ig...
Error on Import: The following fields have been ignored, because they don't exist on the destination table: Model, Model category, Quantity.
Read more >
Invalid look-up value for field 'X' validation error on Data Import
In order to confirm your associated tables are setup correctly so that this error does not appear, when importing records through Data Import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found