Skip to content

Commit

Permalink
Update find_requirements import in pyodide Webworker (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Dec 10, 2023
1 parent 9a22aee commit 7c1df8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nbsite/pyodide/WebWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ async function loadApplication(cell_id, path) {

const autodetect_deps_code = `
import json
from panel.io.mime_render import find_imports
json.dumps(find_imports(msg.to_py()['code']))`
try:
from panel.io.mime_render import find_requirements
except Exception:
from panel.io.mime_render import find_imports as find_requirements
json.dumps(find_requirements(msg.to_py()['code']))`

const exec_code = `
from functools import partial
Expand Down

0 comments on commit 7c1df8c

Please sign in to comment.