Importing Data w/ Link Fields

I am trying to import data for a DocType that has a mandatory link field and am getting an error I do not understand.

DocTypes

My DocTypes are as follows…

Customer

  • name (data) (primary key)
  • address (text)

Order

  • order_number (int) (primary key)
  • product (data) (mandatory)
  • customer (link) (mandatory)
  • customer_name (read only)
  • instructions (text)

What I Did

I have imported Customer data successfully. Now I want to try and import Order data that links to existing customers. To do this, I downloaded the import template for the Order DocType and entered in existing customer names in the column reserved for the customer link field. Since the primary key for my customers is the customer’s name (data), I assumed that entering in the customer name is all that would be required to link an order to an existing customer.

Errors

When I tried importing my data, I got the following error…

AttributeError: ‘int’ object has no attribute ‘strip’

Questions

  • Why am I getting the error mentioned above?
  • How does one import data for DocTypes that include a mandatory link field.