Skip to content
New issue

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

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

Already on GitHub? # to your account

Update find_requirements import in pyodide Webworker #293

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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