WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@anup-dh
Copy link

@anup-dh anup-dh commented Oct 3, 2025

This PR adds proper start time while adding card details (stripe) to eliminate the endlessly showing loading icon and showing this traceback:

Traceback (most recent call last):

  File "apps/frappe/frappe/app.py", line 115, in application

    response = frappe.api.handle(request)

  File "apps/frappe/frappe/api/__init__.py", line 50, in handle

    data = endpoint(**arguments)

  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call

    return frappe.handler.handle()

  File "apps/frappe/frappe/handler.py", line 52, in handle

    data = execute_cmd(cmd)

  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd

    return frappe.call(method, **frappe.form_dict)

  File "apps/frappe/frappe/__init__.py", line 1754, in call

    return fn(*args, **newargs)

  File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper

    return func(*args, **kwargs)

  File "apps/press/press/api/billing.py", line 49, in get_publishable_key_and_setup_intent

    "setup_intent": get_setup_intent(team),

  File "apps/press/press/utils/billing.py", line 145, in get_setup_intent

    "start_date": int(frappe.utils.get_timestamp()),

TypeError: get_timestamp() missing 1 required positional argument: 'date' 

While adding card for billing, the stripe payment details box was showing only the loading icon endlessly. This correction elimilates the error by passing the correct start time.
@tanmoysrt
Copy link
Member

tanmoysrt commented Oct 7, 2025

@anup-dh date is not an mandatory field for get_timestamp function in develop frappe version atleast.

https://github.com/frappe/frappe/blob/faf07ffe95e44e77fce727579cee042b59ad5439/frappe/utils/data.py#L376-L380

Based on git blame, the behaviour of the function hasn't changed in 2yrs.

@anup-dh
Copy link
Author

anup-dh commented Oct 8, 2025

Hmm. but what triggered the error then ?

@tanmoysrt
Copy link
Member

Hmm. but what triggered the error then ?

Check your frappe version and the get_timestamp function source code. Might be you have some modification locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants