Skip to content

Bug when using input() #1

@rtavenar

Description

@rtavenar

Hi,

Thanks for PythonPad, this is amazing!
Recently I ran over a bug when using input() function in my Python code. The bug seems to occur both on my app (https://rtavenar.github.io/exos_python/) and when typing code in your documentation pages.

In Chrome, the error I get in the PythonPad output window is the following:

Traceback (most recent call last):
RuntimeError: NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://www.pythonpad.co/hanger/open/'.
Code running is done.

and this seems to be related to the following warning in the browser Javascript console:

Access to XMLHttpRequest at 'https://www.pythonpad.co/hanger/open/' from origin 'https://pythonpad.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

or, from my app:

Access to XMLHttpRequest at 'https://www.pythonpad.co/hanger/open/' from origin 'https://rtavenar.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Would it be possible to set this 'Access-Control-Allow-Origin' header to allow requests from any domain so that it can be used whatever the origin domain?

This can help: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

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