Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

How to read and understand errors from tracebacks?

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
errortracebackreadsolvingproblem
2 Respuestas
30855 Vistas
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
Descartar
Avatar
Martin
Mejor respuesta
  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
Descartar
Martin

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

ton123
Autor

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
Mejor respuesta

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
Descartar
ton123
Autor

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.

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
I cannot enter the product view
error traceback products
Avatar
Avatar
1
ago 19
4900
Problem with creating printing
error printing problem
Avatar
Avatar
Avatar
3
jun 16
4902
How to Fix RPC_ERROR/ ODOO SERVER ERROR/TRACEBACK
error inventory traceback rpc
Avatar
Avatar
1
may 23
36425
RPC_ERROR Odoo Server Error
error traceback exception v15
Avatar
0
jul 22
4335
Error in: QWeb2: Template 'website.new_contect_loader' not found
error traceback template qweb2
Avatar
0
mar 24
6441
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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