obsidian-execute-code icon indicating copy to clipboard operation
obsidian-execute-code copied to clipboard

Issue with Running Python

Open williamwu062 opened this issue 2 years ago • 4 comments

when attempting to run python code, I am getting this errror

File "<stdin>", line 1 __globals_3542659721031336_1676496996699 = {**globals()} ^ SyntaxError: invalid syntax name '__globals_3542659721031336_1676496996699' is not defined

Currently I have my python path set as /usr/bin/python3 and I was just attempt to run print("hello world") as a test. Any help with this issue would be appreciated. Thank you.

williamwu062 avatar Feb 15 '23 21:02 williamwu062

Hi @williamwu062, please give us more information, like OS, and the exact code block you used

twibiral avatar Feb 23 '23 23:02 twibiral

The same bug here. The system info as below: MacOS 13.0.1, Obsidian 1.4.14, Execute Code 1.8.1 When I am trying this:

print("Vault path:", @vault_path)

the result returned is as below: name '__globals_6984937966833744_1696515121154' is not defined Thank you for your attention.

It finally works a few days later. I don't know what I did right yet.

eumenr avatar Oct 05 '23 14:10 eumenr

I have the same issue.

print("hello there from obsidian")
name '__globals_7530913097808696_1698266731863' is not defined

MacOS: 11.3.1 Obsidian: 1.4.16 Execute Code: (just installed)

actsasgeek avatar Oct 25 '23 20:10 actsasgeek

so this is a little weird and I can't identify the state where it works or not but when I created a split screen with source view on the left and a reading view on the right...it works. ¯_(ツ)_/¯

actsasgeek avatar Oct 26 '23 15:10 actsasgeek