Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

How to read and understand errors from tracebacks?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
errortracebackreadsolvingproblem
2 Risposte
30858 Visualizzazioni
Avatar
ton123

For me as a non programmer it is difficult to understand what a trace back is trying to tell me.

Does anybody has some tricks for reading?

0
Avatar
Abbandona
Avatar
Martin
Risposta migliore
  1. Remember that timing errors between browser and server can cause a lot of exceptions to be thrown, typically the really weird ones. Don't dig too far into a traceback until you've confirmed that it is repeatable in FireFox &/or Chrome &/or Explorer.

  2. Read the traceback from bottom to top. The last two or three lines are all you need to know in most cases.

  3. Get a general understanding of how Python generates exception messages in the first place: http://docs.python.org/2/tutorial/errors.html

  4. Get to know the standard Python exceptions and their meanings. http://docs.python.org/2/library/exceptions.html#bltin-exceptions

  5. Get to know the standard OpenERP exceptions and their meanings. http://bazaar.launchpad.net/~openerp/openobject-server/7.0/view/head:/openerp/exceptions.py

  6. Learn to recognize OpenERP directory names. When you see them in a traceback, especially the ones near the bottom of the traceback, they'll help you get an idea of the general circumstances of the exception.

  7. Usually, tracebacks pinpoint the exact line of an exception with perfect accuracy. Cut'n paste the directory and file name of the last line in the traceback into the {File} >> {Open} dialog of your favorite editor, then go to the indicated line. Study the meaning of the exception. Is it a Python standard exception? Is it an OpenERP standard exception? Did the module developer invent his own? Read the docs of the exception. Try to get an idea of what the code was trying to do. Often an exception is thrown within an if statement; understand what the if condition condition was. For example if (idx > max) : could throw a LookupError. What was being indexed? What was the maximum expected?

  8. Repeat the preceding for the next line up in the traceback. That'll show you the place from which the problem function was called, and will help a lot with getting an idea of what the code was trying to do. For one reason or another it passed garbage to the function that threw the error. Why did it do it?

Don't be afraid of code! Check out this Q & A. https://accounts.openerp.com/forum/Help-1/question/8344?answer=8380#post-id-8380. As you can see AttributeError: 'NoneType' object has no attribute 'search' is just a really unfriendly way of describing a really simple fault.

If you do ask for help, have mercy on the community, DO format the traceback properly. This . . .

Client Traceback (most recent call last):

File "/var/packages/OpenERP6.1/target/openerp/addons/web/common/http.py", 
  line 180, in dispatch response["result"] = method(controller, self, **self.params)

File "/var/packages/OpenERP6.1/target/openerp/addons/web/controllers/main.py",
  line 316, in translations for x in po:

File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/messages/catalog.py", 
  line 522, in __iter__ 

File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/messages/catalog.py", 
  line 302, in _get_mime_headers

File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/dates.py", 
  line 501, in format_datetime

File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/core.py", 
  line 212, in parse

File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/core.py",
  line 137, in __init__ UnknownLocaleError: unknown locale 'en'

. . . is a hell of a lot easier to read than this . . .

Client Traceback (most recent call last): File "/var/packages/OpenERP6.1/target/openerp/addons/web/common/http.py", line 180, in dispatch response["result"] = method(controller, self, **self.params) File "/var/packages/OpenERP6.1/target/openerp/addons/web/controllers/main.py", line 316, in translations for x in po: File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/messages/catalog.py", line 522, in __iter__ File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/messages/catalog.py", line 302, in _get_mime_headers File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/dates.py", line 501, in format_datetime File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/core.py", line 212, in parse File "/volume1/@appstore/Python/usr/lib/python2.7/site-packages/babel/core.py", line 137, in __init__ UnknownLocaleError: unknown locale 'en'

5
Avatar
Abbandona
Martin

wouldn't it be nice if this site had a traceback formatting option!

ton123
Autore

I think this is both helpful for a non programmer / python specialist like me as also for more technical guy's. Thank you, I learn a lot.

Avatar
Lorenzo Cabrini
Risposta migliore

Not strictly related to OpenERP, but nonetheless:

Either become a programmer or forget about it and just provide full stacktraces for developers to look at. May I suggest that the first alternative is a good one? Programming is fun, can be rewarding (and not just financially) and Python is not very hard to learn.

In the meantime, if you get a long stacktrace with many chained errors, you need to try to identify the source error. Usually, look at the bottom of the trace. The message will give you the type of error, the module and the line number that caused the problem. Open up the file in $EDITOR and start looking. Usually this involves keeping a track of what different variables contain line by line.

You will need to get familiar with different error types. Some are provided by Python, such as syntax errors, type errors and value errors. Others are provided by various modules for their own purposes (for example an email parsing module could provide an InvalidEmailError for its own purposes). Searching the 'Net for something like "python valueerror" may be useful to get more information on a particular error type.

2
Avatar
Abbandona
ton123
Autore

This is also helpful for a non programmer / python specialist. Maybe better answers will come. But for me this is at this moment ok. Thank you. Sorry Lorenzo Cabrini you was good, but for me Martin H. Bramwell answer is better.

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
I cannot enter the product view
error traceback products
Avatar
Avatar
1
ago 19
4901
Problem with creating printing
error printing problem
Avatar
Avatar
Avatar
3
giu 16
4903
How to Fix RPC_ERROR/ ODOO SERVER ERROR/TRACEBACK
error inventory traceback rpc
Avatar
Avatar
1
mag 23
36428
RPC_ERROR Odoo Server Error
error traceback exception v15
Avatar
0
lug 22
4335
Error in: QWeb2: Template 'website.new_contect_loader' not found
error traceback template qweb2
Avatar
0
mar 24
6441
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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