Skip to Content
Menu
This question has been flagged
4 Replies
3308 Views

When i install the amazon connector mould, raise up error as below:


ModuleNotFoundError: No module named 'odoo.addons.sale_amazon.lib'
Avatar
Discard
Best Answer

Hello, this issue is caused by a faulty packaging of Odoo. It will be fixed soon.

In the meantime, it is advised to either wait for the packaged installer to be fixed or to download the missing lib/ folder directly from https://github.com/odoo/enterprise/tree/13.0/sale_amazon/lib or https://github.com/odoo/enterprise/tree/14.0/sale_amazon/lib if you have access to it.

Downloading the version of the lib on https://github.com/python-amazon-mws/python-amazon-mws is *not* recommended because Odoo uses a patched version of the library and because there is no guarantee that the suggested versions are compatible with Odoo.

Avatar
Discard
Best Answer

Hello Su Sheng Jin, 

It seem 'sale_amazon' module is not present inside the addons due to this you are getting this issue

Kindly place this module inside addons

Or 'sale_amazon' dependency in not added inside __manifest__.py file

Kindly try this and let us know in case you still have the any issue. 

Thanks

Anisha Bahukhandi

Technical Content Writer

Avatar
Discard
Best Answer

I counter the same problem after trying install the "Amazon Connector".

It seems that the code shipped with sale_amazon lacking a lib directory which provides the utilities for fetching and syncing data with Amazon Web Service, after searching the Google, I found an open source repository (located in https://github.com/python-amazon-mws/python-amazon-mws )can satisfied our requirement. 
Therefore Download the repository and place it into odoo.addons.sale_amazon.lib directory.

Avatar
Discard

thank you @dino liu for sharing this knowledge with us, sure this will help a lot :)

Best Answer

could you solve the problem?

ModuleNotFoundError: No module named 'odoo.addons.sale_amazon.lib'

i tried to download the repo and created the lib folder and put in in my enterprise_addons/amazon_sale/lib/ folder.

Now the error is not that it cant find the lib, but inside the lib the python imports dont work.

  File "/mnt/extra-addons/sale_amazon/lib/mws/mws.py", line 14, in <module>
    from mws.errors import MWSError
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ModuleNotFoundError: No module named 'mws.errors'
Avatar
Discard