Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Exclude sys.pycache_prefix from search for jep in python startup script#1455

Merged
jeremyrsmith merged 1 commit intopolynote:masterpolynote/polynote:masterfrom
JanukanS:remove-pycache-prefixJanukanS/polynote:remove-pycache-prefixCopy head branch name to clipboard
Nov 21, 2024
Merged

Exclude sys.pycache_prefix from search for jep in python startup script#1455
jeremyrsmith merged 1 commit intopolynote:masterpolynote/polynote:masterfrom
JanukanS:remove-pycache-prefixJanukanS/polynote:remove-pycache-prefixCopy head branch name to clipboard

Conversation

@JanukanS
Copy link
Contributor

Previously running the polynote.py startup script gave me the following error (WSL2, Ubuntu 22.04.1 LTS, Python 3.12.3)

Traceback (most recent call last): File "/home/janukan/projects/polynote/scripts/polynote.py", line 13, in <module> os.environ['PYTHONPATH'] = os.pathsep.join(sys_prefixes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: sequence item 0: expected str instance, NoneType found

This error is caused by sys_prefixes including the value for sys.pycache_prefix. When sys.pycache_prefix is not set by a command-line option or an environment variable, it defaults to None. As sys.pycache_prefix determines where bytecode files are stored, it seems safe to exclude this from the search for jep.

@jeremyrsmith
Copy link
Contributor

Thanks @JanukanS! I have seen this issue locally too... I think I hacked around it just by filtering all Nones out, without really understanding what the issue was. I like your solution better!

@jeremyrsmith jeremyrsmith merged commit 6600b1e into polynote:master Nov 21, 2024
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

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.