GUI and trytond_import_countries/currencies gives trytond.model.modelstorage.SelectionValidationError

(0 comments)

So I got this error when trying to run trytond_import_countries and trytond_import_currencies ..

 Update countries
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.6/trytond_import_countries", line 11, in <module>
load_entry_point('trytond-country==5.8.0', 'console_scripts', 'trytond_import_countries')()
File "/usr/lib64/python3.6/site-packages/trytond/modules/country/scripts/import_countries.py", line 171, in run
main(args.database, args.config_file)
File "/usr/lib64/python3.6/site-packages/trytond/modules/country/scripts/import_countries.py", line 151, in main
do_import()
File "/usr/lib64/python3.6/site-packages/trytond/modules/country/scripts/import_countries.py", line 156, in do_import
countries = update_countries(countries)
File "/usr/lib64/python3.6/site-packages/trytond/modules/country/scripts/import_countries.py", line 60, in update_countries
Country.save(records)
File "/usr/lib64/python3.6/site-packages/proteus/__init__.py", line 104, in newfunc
return self.func(owner, *args, **kwargs)
File "/usr/lib64/python3.6/site-packages/proteus/__init__.py", line 847, in save
ids = proxy.create(values, context)
File "/usr/lib64/python3.6/site-packages/proteus/config.py", line 188, in __call__
result = rpc.result(meth(*args, **kwargs))
File "/usr/lib64/python3.6/site-packages/trytond/modules/country/country.py", line 70, in create
return super(Country, cls).create(vlist)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelsql.py", line 159, in wrapper
return func(cls, *args, **kwargs)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelsql.py", line 659, in create
list(translations.keys()), list(translations.values()))
File "/usr/lib64/python3.6/site-packages/trytond/ir/translation.py", line 488, in set_ids
cls.save(to_save)
File "/usr/lib64/python3.6/site-packages/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelstorage.py", line 1727, in save
news = cls.create([save_values[r] for r in to_create])
File "/usr/lib64/python3.6/site-packages/trytond/ir/translation.py", line 632, in create
return super(Translation, cls).create(vlist)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelsql.py", line 159, in wrapper
return func(cls, *args, **kwargs)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelsql.py", line 674, in create
cls._validate(sub_records)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelstorage.py", line 76, in wrapper
return func(*args, **kwargs)
File "/usr/lib64/python3.6/site-packages/trytond/model/modelstorage.py", line 1306, in _validate
**error_args))
trytond.model.modelstorage.SelectionValidationError: Der Wert "de_AT" von Feld "Sprache" in "\xdcbersetzung" ist nicht in der Auswahl enthalte

Turns out it was because the admin user had an invalid language set (de_AT is not something tryton knows by default .. changing to de or en in the settings of the client fixes the problem).

Alternatively add a language with the specified language code first :)

Thanks again cedk @ freenode IRC ;)

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

Recent Posts

Archive

2021
2020
2019
2018
2014
2012
2011
2010
2009
2008
2007

Categories

Authors

Feeds

RSS / Atom