Thread: Python KeyError

  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Rep Power

    Python KeyError

    Dear Sirs,

    I would like to ask a question that may seem a little off-topic but since it is related to Python and I really cannot solve it - I thought to try to ask for some help here.

    I have installed OpenERP, an open source ERP software and then I installed an extension for connecting it to Magento. But when I configure it and try to connect them, I am getting and error that says:

    "File "/opt/openerp/v7/server/openerp/modules/", line 102, in __getitem__
    return self.models[model_name]
    KeyError: u'magento.instance'"

    This is the function in the file:

    "def __getitem__(self, model_name):
    """ Return a model for a given name or raise KeyError if it doesn't exist."""
    return self.models[model_name]

    Any help is appreciated, thanks
  2. #2
  3. Contributing User

    Join Date
    Aug 2011
    Rep Power
    This could be a python version problem. Try again with python3.

    Otherwise maybe it's an installation problem. The function raised a KeyError because the model doesn't exist.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo