shopify.api_version.VersionNotFoundError

Hi,

I’m having trouble with the Shopify Connector. When setting up an item (though “Upload New ERPNext Items to Shopify” is not checked/enabled) I get the following error. Same error shows up when I try to Uncheck the “Enable Shopify” Checkbox in the Shopify Setting screen and try and save, I get the same error. Any suggestions?

Thanks

Jay

App Versions

{
	"ecommerce_integrations": "1.15.4",
	"erpnext": "13.50.0",
	"frappe": "13.56.1"
}

Route

Form/Shopify Setting/Shopify Setting

Trackeback

Traceback (most recent call last):
  File "env/lib/python3.8/site-packages/shopify/api_version.py", line 17, in coerce_to_version
    return cls.versions[version]
KeyError: '2022-04'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 66, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1473, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 25, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 312, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 349, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1054, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 943, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 940, in fn
    return method_object(*args, **kwargs)
  File "apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_setting/shopify_setting.py", line 43, in validate
    self._handle_webhooks()
  File "apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_setting/shopify_setting.py", line 71, in _handle_webhooks
    connection.unregister_webhooks(self.shopify_url, self.get_password("password"))
  File "apps/ecommerce_integrations/ecommerce_integrations/shopify/connection.py", line 65, in unregister_webhooks
    with Session.temp(shopify_url, API_VERSION, password):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "env/lib/python3.8/site-packages/shopify/session.py", line 37, in temp
    original_session = shopify.Session(original_domain, original_version, original_token)
  File "env/lib/python3.8/site-packages/shopify/session.py", line 47, in __init__
    self.version = ApiVersion.coerce_to_version(version)
  File "env/lib/python3.8/site-packages/shopify/api_version.py", line 19, in coerce_to_version
    raise VersionNotFoundError
shopify.api_version.VersionNotFoundError