Setup Wizard - Error

When I select the Portuguese as default language in the Setup Wizard, the following appears:

Traceback (innermost last):
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 67, in application
    response = frappe.handler.handle()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 74, in handle
    execute_cmd(cmd)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 99, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 757, in call
    return fn(*args, **newargs)
  File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.py", line 572, in load_messages
    m = get_dict("page", "setup-wizard")
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/translate.py", line 113, in get_dict
    translation_assets[asset_key] = make_dict_from_messages(messages)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/translate.py", line 148, in make_dict_from_messages
    full_dict = get_full_dict(frappe.local.lang)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/translate.py", line 176, in get_full_dict
    frappe.local.lang_full_dict = load_lang(lang)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/translate.py", line 186, in load_lang
    csv_content = read_csv_file(path)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/translate.py", line 387, in read_csv_file
    newdata = [[unicode(val, 'utf-8') for val in row] for row in data]
 Error: newline inside string

So I made an attempt using English as the default language and it appeared at the end of the Setup Wizard:

Note: I am using the latest version of ERPNext.

Hi can you post this on Issues · frappe/erpnext · GitHub

CC @anand

1 Like

Hi @Gleisson03

I’ve pushed a fix. Can you update and try again? It should start working in Portuguese.

Thanks,
Anand.

1 Like

I apologize for having created the topic in the wrong place, next time I will create on Github. Thank you for your support.

Hi can you post this on https://github.com/frappe/erpnext/issues1

CC @anand

Thank you, problem solved.

Hi @Gleisson03

I’ve pushed a fix. Can you update and try again? It should start working in Portuguese.

Thanks,
Anand.

Hi! I encountered the similar problem as gleisson03.

  1. downloaded virtual image and installed on virtual box updated frappe
  2. in both master and developer using bench update signed in as
  3. administrator and ran the setup wizard used english language clicked
  4. on submit and got the error. [unfortunately i’m not able to post an image as I’m a new user].

Please refer to the Pop-up error message → 2nd image in gleisson03’s message in this thread.

How do i fix this? Thanks!

Brgrds,
R

@rayman can you try again. Does not seem a usual error. (~25 setup wizards get completed every day on erpnext.com)

Hi Rushabh,

I tried the following

a) on the same laptop, bench update --upgrade and run again
b) tried installing virtual box and upload virtual image in another laptop
c) tried using a different country (Philippines, Singapore)

and got the same errors on the popup window after going through the setup process:

Any ideas?

Thanks
R

Still same error continuing and yet no resolution. Anybody any suggestion?

@rmehta - I too am experiencing exactly the same error.

Which language are you using for setup wizard?

English

Can you share what is present in the JS error console when you get this error. There could be something in the data your are entering.

@rmehta : Here you go:

Traceback (innermost last):
File “/home/dir/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.handler.handle()
File “/home/dir/frappe-bench/apps/frappe/frappe/handler.py”, line 74, in handle
execute_cmd(cmd)
File “/home/dir/frappe-bench/apps/frappe/frappe/handler.py”, line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/dir/frappe-bench/apps/frappe/frappe/init.py”, line 758, in call
return fn(*args, **newargs)
File “/home/dir/frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.py”, line 37, in setup_account
install_fixtures.install(args.get(“country”))
File “/home/dir/frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py”, line 193, in install
doc.insert(ignore_permissions=True)
File “/home/dir/frappe-bench/apps/frappe/frappe/model/document.py”, line 188, in insert
self.db_insert()
File “/home/dir/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 264, in db_insert
), d.values())
File “/home/dir/frappe-bench/apps/frappe/frappe/database.py”, line 135, in sql
self._cursor.execute(query, values)
File “/home/dir/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/dir/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
DuplicateEntryError: (u’Print Heading’, u’Credit Note’, IntegrityError(1062, “Duplicate entry ‘Credit Note’ for key ‘PRIMARY’”))

Seems like a freak issue. Just reset your VM and run again

btw, we just pushed a new VM recently (or did we @pdvyas?)

Yes, released an updated vm a few hours back

I’ve downloaded the new Virtualbox image yesterday. I still get the same error.

I used english and Philippines. Is there something wrong with my settings? Appreciate if anyone can help.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 74, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 99, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 758, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.py”, line 37, in setup_account
install_fixtures.install(args.get(“country”))
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py”, line 193, in install
doc.insert(ignore_permissions=True)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 188, in insert
self.db_insert()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 264, in db_insert
), d.values())
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 135, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
DuplicateEntryError: (u’Print Heading’, u’Credit Note’, IntegrityError(1062, “Duplicate entry ‘Credit Note’ for key ‘PRIMARY’”))

Pls update your bench by ‘bench update’

I have solved this by reinstalling site.
You can also create new site.

Thanks Kolate. bench update and bench reinstall worked. I’m now able to finish the setup wizard.

1 Like