Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to read and understand errors from tracebacks?

Subscribe

Get notified when there's activity on this post

This question has been flagged
errortracebackreadsolvingproblem
2 Replies
30850 Views
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
Discard
Avatar
Martin
Best Answer
  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
Discard
Martin

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

ton123
Author

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
Best Answer

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
Discard
ton123
Author

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.

Enjoying the discussion? Don't just read, join in!

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

Sign up
Related Posts Replies Views Activity
I cannot enter the product view
error traceback products
Avatar
Avatar
1
Aug 19
4898
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
36411
RPC_ERROR Odoo Server Error
error traceback exception v15
Avatar
0
Jul 22
4334
Error in: QWeb2: Template 'website.new_contect_loader' not found
error traceback template qweb2
Avatar
0
Mar 24
6440
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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