Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importation of user module does not work anymore #2381

Closed
epeios-q37 opened this issue Mar 4, 2024 · 2 comments
Closed

Importation of user module does not work anymore #2381

epeios-q37 opened this issue Mar 4, 2024 · 2 comments

Comments

@epeios-q37
Copy link

epeios-q37 commented Mar 4, 2024

Hello,

I use Brython with a module of mine, called atlastk. With Brython version 3.12.2, the importation of this module fails.

Here is the code I use for the testing:

import browser

try:
    import atlastk
except:
    browser.alert("FAILURE!")
else:
    browser.alert("Success.")

Here's the link to test this code with version 3.12.1: https://faas.q37.info/brython/?version=3.12.1&code=import%20browser%0A%0Atry%3A%0A%20%20%20%20import%20atlastk%0Aexcept%3A%0A%20%20%20%20browser.alert%28%22FAILURE!%22%29%0Aelse%3A%0A%20%20%20%20browser.alert%28%22Success.%22%29

By clicking the Run button, you will have (it will take about 10 seconds) the message "Success.", meaning that the importation was successful.

Following link is the same but with version 3.12.2: https://faas.q37.info/brython/?version=3.12.2&code=import%20browser%0A%0Atry%3A%0A%20%20%20%20import%20atlastk%0Aexcept%3A%0A%20%20%20%20browser.alert%28%22FAILURE!%22%29%0Aelse%3A%0A%20%20%20%20browser.alert%28%22Success.%22%29

This time, clicking the Run button will display the message "FAILURE!", meaning that the importation failed.

The problem is that with the version 3.12.1, Brython, to import the atlastk module, uses the (correct) query https://faas.q37.info/brython/atlastk.py, but, with the version 3.12.2, it uses https://cdn.jsdelivr.net/brython/atlastk.py

With the development version, the importation fails too.

@PierreQuentel
Copy link
Contributor

Merci de l'avoir signalé tout de suite Claude !
I have published a new version 3.12.3 hopefully fixing this critical bug. Can you check ?

@epeios-q37
Copy link
Author

Merci avoir posté cette nouvelle version aussi rapidement, mais…

The importation of a Python module seems to work again, but there is now a problem with the importation of a JS module: #2382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants