[Solved] Update self translated CSV to local server

hi everyone…

we are trying to update translations of the ERPnext but i got an error when doing so:

/home/frappe/frappe-bench# bench update-translations th /home/frappe/frappe-bench/sites/en.csv /home/tgroup/th-u.csv
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands.py", line 704, in update_translations
    frappe.init(site=site)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 121, in init
    local.conf = _dict(get_site_config())
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 175, in get_site_config
    raise IncorrectSitePath, "{0} does not exist".format(site_config)
frappe.exceptions.IncorrectSitePath: 404: Not Found

You usually get this when you don’t specify your --site option correctly.

Try adding --site to the command you’re trying.

@vjFaLk it gave me an error: Error: no such option: --site

the options for bench update-translations are:

 Usage: bench  update-translations [OPTIONS] LANG UNTRANSLATED_FILE TRANSLATED_FILE

i also tried from the path of the site it self but same thing…

the main error is:

 local.conf = _dict(get_site_config())
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 175, in get_site_config
    raise IncorrectSitePath, "{0} does not exist".format(site_config)
frappe.exceptions.IncorrectSitePath: 404: Not Found

i found it was a file issue not system issue, excel changed the csv encoding so i changed it back to UTF8 and now its working (got another error unrelated but it was read already)…

the second issue was i didnt use site on bench so i just did:

bench use sitename

close please :smiley:

1 Like