Import Data Tool

Hi,

I’m trying to use the import data tool to import data from an instance I’ve created to test ERPNext. When importing the warehouses I see the following error on all the warehouses.

Error for row (#21) “Seconds - 23 Montague Drive - PP” : coercing to Unicode: need string or buffer, NoneType found

Any advice on how to fix this.
Thank you for your time.

Regards,
Tjommie

Hard to say without looking at your CSV.

Make a test Warehouse from the user interface and then download the CSV with data. Then compare what is the expected format.

The data is in the exact same format. I’ve removed all the warehouses from the new instance and still get the same result. What would be the best way to duplicate an instance, I want to create a duplicate for employees to train on.

Backup and restore

bench --site site1 backup
bench --site site2 restore site1.sql

Thanks, but the sites are running on two different servers. I’ve tried copying the virtual machines, but that doesn’t seem to work. Any advice?

Copy the .sql file into your target server

Where do I find the .sql file and how do I know which one is the correct file? Do I have to perform the backup before hand? Sorry if these are ignorant questions, I’m an industrial engineer by profession and have limited development experience.

Regards,
Tjommie

Me too :smile:

Your files will be in sites/[site_name]/private/backups

Thank you.

[quote=“rmehta, post:8, topic:7813”]
Me too :smile:
[/quote] Then I’m in good company :smile:

How do I get the site name, how is it determined?

How did you install it? Please read GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

I downloaded the virtual image and its running on the Oracle VM.

Is site1 the default site name?

Yes, site1.local is the default site name.

When i enter this command I get the following error:

OSError: [Errno 2] No such file or directory: ‘.sites’

Am I in the wrong directory?

@DieTjommie use this:

bench --site site1.local backup 

On the target site to restore the backup use:

bench --site your_complete_site_name restore SQL_FILE_PATH

@ruchin78 , I have used this and still get the same error.

From which folder you are running this command?
use it from frappe-bench
also check whether the folder with the name site1.local exists or not.

So i created the folder under frappe-bench\sites\site1.local.
Is this the correct path?

I then ran the command:
bench --site site1.local backup
this fails on the following python script - database.py, line 425

Seems like it is trying to build up the .sql script to create the tabSingles table but fails for some reason giving the message that argument should be a string.

Can you please help me to understand if there is something wrong with the database table structure, data or if i am not formatting the command correctly?

Is the site self hosted or in apache and where can i verify that site1.local is in fact the correct name of the site?

There is be already be a folder with the name site1.local under frappe-bench/sites/
if there was no folder under frappe-bench/sites then no need to create that one, it will not solve your purpose, please tell what folders you have under the directory frappe-bench/sites/

assets
erpnext.erpnext-vm