Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

UnicodeEncodeError

Odoberať

Get notified when there's activity on this post

This question has been flagged
invoiceprintreportencodingutf8
9 Replies
16605 Zobrazenia
Avatar
Marko

When trying to print a an invoice I get:

2014-07-29 06:08:51,048 1057 ERROR openerp openerp.service.web_services: Exception: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
Traceback (most recent call last):
  File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 442, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 476, in create_source_pdf
    result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 533, in create_single_pdf
    pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
  File "/opt/openerp-7.0-20140728-231228/openerp/report/interface.py", line 206, in create_pdf
    obj.render()
  File "/opt/openerp-7.0-20140728-231228/openerp/report/render/render.py", line 59, in render
    self._result = self._render()
  File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml.py", line 41, in _render
    return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 1032, in parseNode
    r.render(fp)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 328, in render
    pt_obj.render(el)
  File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 1012, in render
    self.doc_tmpl.build(fis)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 890, in build
    self.handle_flowable(flowables)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 773, in handle_flowable
    if frame.add(f, canv, trySplit=self.allowSplitting):
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/frames.py", line 161, in _add
    w, h = flowable.wrap(aW, h)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 1173, in wrap
    self._calc(availWidth, availHeight)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 625, in _calc
    self._calc_height(availHeight,availWidth,W=W)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 556, in _calc_height
    dW,t = self._listCellGeom(v,w or self._listValueWidth(v),s)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 397, in _listCellGeom
    vw, vh = v.wrapOn(canv, aW, aH)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/flowables.py", line 121, in wrapOn
    w, h = self.wrap(aW,aH)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 1036, in wrap
    blPara = self.breakLines([first_line_width, later_widths])
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 1244, in breakLines
    words[0:0] = _splitWord(word,maxWidth-spaceWidth-currentWidth,maxWidths,lineno,fontName,fontSize,self.encoding)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 553, in _splitWord
    R.append(_SplitText(wordText))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
2014-07-29 06:08:51,171 1057 ERROR openerp openerp.netsvc: ascii
Jediničn
6
7
ordinal not in range(128)
(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Jedini\u010dn', 6, 7, 'ordinal not in range(128)'), <traceback object at 0x7f323abdb9e0>)
Traceback (most recent call last):
  File "/opt/openerp-7.0-20140728-231228/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/opt/openerp-7.0-20140728-231228/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'ascii\nJedini\u010dn\n6\n7\nordinal not in range(128)', (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Jedini\u010dn', 6, 7, 'ordinal not in range(128)'), <traceback object at 0x7f323abdb9e0>))
2014-07-29 06:08:51,174 1057 INFO openerp werkzeug: 127.0.0.1 - - [29/Jul/2014 06:08:51] "POST /web/report HTTP/1.1" 500 -

 

The language is set to Croatian.

The above error seems to occur when the po files are read for the report like /openerp/addons/account/i18n/hr.po and then it doesn't understand characters like č. Or it can't encode č, I don't know really.

0
Avatar
Zrušiť
JC

On which operating system and version?

OdooBot

This is on Ubuntu 14.4.
This same setup is working on gentoo ( latest).
Thanks

On 12 Aug 2014 12:54, "jc" <jcchua@mail.odoo.com> wrote:

On which operating system and version?

--
jc Sent by OpenERP S.A. using Odoo. Access your messages and documents in Odoo
Avatar
JC
Best Answer

Since you are on ubuntu 14.04, the issue could be due to reportlab 3.0

odoo/openerp7 is using reportlab 2.6 but ubuntu 14.04 upgraded it to reportlab 3.0  Try this:

1) Download reportlab reportlab-2.6.tar.gz (md5)  from https://pypi.python.org/pypi/reportlab/2.6

2) unzip > look for src directory copy reportlab directory to replace reportlab v3 at  /usr/lib/python2.7/dist-packages/reportlab in ubuntu server

3
Avatar
Zrušiť
Pascal Tremblay

Not sure it works on Odoo 8. I can't restart the server if I do this.

Pascal Tremblay

Still this error for me : writer.writerow((module, type, name, res_id, src, trad)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128). Even with reportlab 2.6.

Avatar
Md Abdur Rahim
Best Answer

I need HELP, anyone please give me solution for this error...

++++++++++++++++



Odoo

Odoo Server Error

Traceback (most recent call last):

File "/opt/odoo/openerp/http.py", line 537, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/opt/odoo/openerp/http.py", line 574, in dispatch

result = self._call_function(**self.params)

File "/opt/odoo/openerp/http.py", line 310, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/opt/odoo/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo/openerp/http.py", line 307, in checked_call

return self.endpoint(*a, **kw)

File "/opt/odoo/openerp/http.py", line 803, in __call__

return self.method(*args, **kw)

File "/opt/odoo/openerp/http.py", line 403, in response_wrap

response = f(*args, **kw)

File "/opt/odoo/addons/web/controllers/main.py", line 948, in call_button

action = self._call_kw(model, method, args, {})

File "/opt/odoo/addons/web/controllers/main.py", line 936, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/addons/base/module/module.py", line 446, in button_immediate_install

return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/addons/base/module/module.py", line 494, in _button_immediate_function

registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)

File "/opt/odoo/openerp/modules/registry.py", line 370, in new

openerp.modules.load_modules(registry._db, force_demo, status, update_module)

File "/opt/odoo/openerp/modules/loading.py", line 355, in load_modules

loaded_modules, update_module)

File "/opt/odoo/openerp/modules/loading.py", line 255, in load_marked_modules

loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

File "/opt/odoo/openerp/modules/loading.py", line 157, in load_module_graph

init_module_models(cr, package.name, models)

File "/opt/odoo/openerp/modules/module.py", line 286, in init_module_models

result = obj._auto_init(cr, {'module': module_name})

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/models.py", line 2636, in _auto_init

self._set_default_value_on_column(cr, k, context=context)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/models.py", line 2398, in _set_default_value_on_column

default = default(self, cr, SUPERUSER_ID, context)

File "/opt/odoo/addons/account/account.py", line 1219, in _get_period

period_ids = self.pool.get('account.period').find(cr, uid, context=ctx)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/addons/account/account.py", line 1046, in find

model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_period')

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/opt/odoo/openerp/addons/base/ir/ir_model.py", line 968, in get_object_reference

return self.xmlid_lookup(cr, uid, "%s.%s" % (module, xml_id))[1:3]

File "/opt/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "<string>", line 2, in xmlid_lookup

File "/opt/odoo/openerp/tools/cache.py", line 74, in lookup

value = d[key] = self.method(*args, **kwargs)

File "/opt/odoo/openerp/addons/base/ir/ir_model.py", line 926, in xmlid_lookup

raise ValueError('External ID not found in the system: %s' % (xmlid))

ValueError: External ID not found in the system: account.action_account_period

0
Avatar
Zrušiť
Avatar
Balvant Ramani
Best Answer

i faced same problem. please help.


return self.app(environ, start_wrapped)

File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__

return self.app(environ, start_response)

File "/opt/odoo/openerp/http.py", line 1441, in dispatch

return response(environ, start_response)

File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 1200, in __call__

app_iter, status, headers = self.get_wsgi_response(environ)

File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 1190, in get_wsgi_response

return app_iter, self.status, headers.to_wsgi_list()

File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1185, in to_wsgi_list

return [(k, v.encode('latin1')) for k, v in self]

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 49-53: ordinal not in range(256)


0
Avatar
Zrušiť
Avatar
Gratien HOUNDAKO
Best Answer

thanks jc :-)

0
Avatar
Zrušiť
Avatar
Marko
Autor Best Answer

That was it, thanks jc :-)

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Strip string from a field with defined separator in invoice report Solved
invoice print custom report
Avatar
1
mar 22
3227
Issue in printing custom invoice report?
invoice print report odoo10
Avatar
Avatar
1
aug 17
6560
report.external_layout lost unable to print quotation/invoices Odoo 8 Solved
invoice print report quotation odooV8
Avatar
Avatar
1
dec 21
4864
Display report based on condition in "Print" dropdown
invoice customer print supplier report
Avatar
0
jún 17
3815
Sometimes, Invoice Report is loading, but not showing...
invoice print report not showing
Avatar
0
mar 15
4952
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now