pyxel-studio / www.pyxelstudio.net

Online Development Environment for PYXEL (a retro game engine for Python by @kitao)
6 stars 0 forks source link

Unable to import code from local python file #2

Open Ninjdai1 opened 1 year ago

Ninjdai1 commented 1 year ago

When using an import statement directed to a .py file located in the same directory, I get the error: module not found: image image image

laurentabbal commented 1 year ago

Hi, it should be ok now. Can you try again?

Ninjdai1 commented 1 year ago

Hi, I tried with both from button import * and import button and it still doesn't work, unless I'm doing it wrong, which I don't believe: image

alexkorol commented 1 year ago

import_app game error files I also have a similar issue, unable to import modular code in Pyxel Studio.

nopid commented 2 months ago

Looking at the current version of pyxel.js served on https://www.pyxelstudio.net/wasm/pyxel.js, it looks like the call to fetchFiles is missing an await (line 99):

  // === PYXEL STUDIO =======================================================
  await fetchFiles(pyodide, params)
  // ======================================================================== 

Tested with Firefox devtools using a replacment file, it fixed the problem.