Technical mailing list archives


Re: Debug Odoo in Visual Studio

Segrey Software BVBA, Steven Segers
- 29/06/2018 08:02:03
Hello Manuel

Thank you for your assistance. In the end I gave up trying to use Visual Studio. I switched to Visual Studio Code. There's it's working fine.

Best regards


On Fri, Jun 22, 2018 at 2:11 PM Manuel Pagani <> wrote:


dump_option_header can be found if you install urllib2, the problem is: that package is used in python2.7, when instead you are using a >3.0 version.

This means that there are some of your modules, I think, of version 10 in your Odoo11 addons folder.

Let me know if that solve, at least in part, your problem.


Thanks and regards,


Manuel Pagani

Odoo & Python Developer


O 0354935483



Nexapp S.r.l. 

Via A. Manzoni,33 - 24030 Medolago BG – PI/CF 04061840163 –  


Subject to local law, communications with Nexapp and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Nexapp policy.  

P Before printing, think about the environment


Da: Steven Segers <>
Inviato: venerdì 22 giugno 2018 13:44
A: Technical <>
Oggetto: Debug Odoo in Visual Studio




I'm trying to set up Visual Studio (not Visual Studio Code) to debug Odoo. (I know, I'm a bit strange). I want to take this route because VS is my most used IDE, so it would be convenient to be able to use that for Odoo as well. Since VS supports Python development, I figured there should be no particular reason this should not work. But perhaps there is?


So, I imported Odoo 11 into a Visual Studio project (using Create project from existing code), set up a virtual environment based on Python 3.6 and let VS import all the dependencies based on requirements.txt. I then added the psycopg2 dependency. Why I try to start Odoo, I get the following exception:


Standard library module invoked user code during import; breakpoints disabled for invoked code.

The thread 'MainThread' (0x4160) has exited with code 0 (0x0).

Traceback (most recent call last):

  File "C:\Projects\Odoo\odoo\odoo-bin", line 5, in <module>

    import odoo

  File "C:\Projects\Odoo\odoo\odoo\", line 84, in <module>

    from . import modules

  File "C:\Projects\Odoo\odoo\odoo\modules\", line 8, in <module>

    from . import db, graph, loading, migration, module, registry

  File "C:\Projects\Odoo\odoo\odoo\modules\", line 10, in <module>

    import as tools

  File "C:\Projects\Odoo\odoo\odoo\tools\", line 9, in <module>

    from .misc import *

  File "C:\Projects\Odoo\odoo\odoo\tools\", line 25, in <module>

    import werkzeug.utils

  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\", line 152, in <module>


  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\", line 71, in <module>

    from werkzeug.wrappers import Response

  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\", line 26, in <module>

    from werkzeug.http import HTTP_STATUS_CODES, \

  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\", line 28, in <module>

    from urllib.request import parse_http_list as _parse_list_header

  File "C:\apps\Python36\lib\urllib\", line 88, in <module>

    import http.client

  File "C:\Projects\Odoo\odoo\odoo\", line 31, in <module>

    import werkzeug.contrib.sessions

  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\contrib\", line 63, in <module>

    from werkzeug.datastructures import CallbackDict

  File "C:\Projects\Odoo\odoo\Odoo 11 Python 3.6 32bit\lib\site-packages\werkzeug\", line 2700, in <module>

    from werkzeug.http import dump_options_header, dump_header, generate_etag, \

ImportError: cannot import name 'dump_options_header'

The program '[23900] python.exe' has exited with code 1 (0x1).


This is the piece of code from Werkzeug where it falls-over (those are the last lines in the file):


# circular dependencies

from werkzeug.http import dump_options_header, dump_header, generate_etag, \

    quote_header_value, parse_set_header, unquote_etag, quote_etag, \

    parse_options_header, http_date, is_byte_range_valid

from werkzeug import exceptions


Unfortunately my knowledge of Python doesn't go very deep, so I'm stuck at this point. Any help would be appreciated.



Post to:

Questo messaggio e' stato analizzato con EASY ESVA ed e' risultato non infetto.
Clicca qui per segnalarlo come spam.

Clicca qui per metterlo in blacklist

Post to:


Steven Segers | Managing Partner   +32 474 984 390
  Jonkheer Paul Coppietersdreef 30, 8200 Brugge, Belgium   +32 50 969 955