Skip to content

Shopify Setting save fails due to invalid job_id #427

@llavkush

Description

@llavkush

This is the following error i am getting when trying to sync old orders and import products from shopify, Note I have setup ERPNext and bench setup locally for development and also using ngrok for accessing erp theoigh https

App Versions

{
	"ecommerce_integrations": "1.17.0",
	"erpnext": "15.104.3",
	"frappe": "15.105.0"
}

Route

shopify-import-products

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 120, in application
    response = frappe.api.handle(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/__init__.py", line 52, in handle
    data = endpoint(**arguments)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/v1.py", line 40, in handle_rpc_call
    return frappe.handler.handle()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 53, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1760, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/ecommerce_integrations/ecommerce_integrations/shopify/page/shopify_import_products/shopify_import_products.py", line 121, in import_all_products
    frappe.enqueue(
  File "apps/frappe/frappe/__init__.py", line 2269, in enqueue
    return frappe.utils.background_jobs.enqueue(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/background_jobs.py", line 172, in enqueue
    return enqueue_call()
           ^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/background_jobs.py", line 156, in enqueue_call
    return q.enqueue_call(
           ^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/rq/queue.py", line 729, in enqueue_call
    job = self.create_job(
          ^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/rq/queue.py", line 579, in create_job
    job = self.job_class.create(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/rq/job.py", line 319, in create
    job.id = id
    ^^^^^^
  File "env/lib/python3.12/site-packages/rq/job.py", line 764, in id
    validate_job_id(value)
  File "env/lib/python3.12/site-packages/rq/job.py", line 85, in validate_job_id
    raise ValueError('Job ID must only contain letters, numbers, underscores and dashes')
ValueError: Job ID must only contain letters, numbers, underscores and dashes

Request Data

{
	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/ecommerce_integrations.shopify.page.shopify_import_products.shopify_import_products.import_all_products",
	"request_id": null
}

Response Data

{
	"exception": "ValueError: Job ID must only contain letters, numbers, underscores and dashes",
	"exc_type": "ValueError",
	"_exc_source": "ecommerce_integrations (app)"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions