Closed tnemrap closed 1 week ago
This is difficult to debug. The problem is the reformat_mouser_price function. It works for Germany. Anyhow Mouser calculates the currency based on geofencing. I cannot get Swedish prices for test. I changed the function. Might be it works now. Just give it a try.
Can we close this?
Will try it,
Hi
I get this error from worker
Sep 22 22:50:46 astrid inventree[867584]: Failed 'plugin.registry.call_plugin_function' (asparagus-salami-twelve-four) - c> Sep 22 22:50:46 astrid inventree[867584]: File "/opt/inventree/env/lib/python3.11/site-packages/django_q/worker.py", lin> Sep 22 22:50:46 astrid inventree[867584]: res = f(*task["args"], **task["kwargs"]) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: File "/opt/inventree/src/backend/InvenTree/plugin/registry.py", line 180, in c> Sep 22 22:50:46 astrid inventree[867584]: return plugin_func(*args, **kwargs) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: File "/opt/inventree/env/lib/python3.11/site-packages/inventree_supplier_sync/> Sep 22 22:50:46 astrid inventree[867584]: Success=self.UpdateSupplierParts(sp) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: File "/opt/inventree/env/lib/python3.11/site-packages/inventree_supplier_sync/> Sep 22 22:50:46 astrid inventree[867584]: NewPrice=self.ReformatPrice(pb['Price']) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: File "/opt/inventree/env/lib/python3.11/site-packages/inventree_supplier_sync/> Sep 22 22:50:46 astrid inventree[867584]: NewPrice=locale.atof(price.strip(conv['currency_symbol'])) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: File "/usr/lib/python3.11/locale.py", line 338, in atof Sep 22 22:50:46 astrid inventree[867584]: return func(delocalize(string)) Sep 22 22:50:46 astrid inventree[867584]: ^^^^^^^^^^^^^^^^^^^^^^^^ Sep 22 22:50:46 astrid inventree[867584]: ValueError: could not convert string to float: '385 kr'