You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run my own python program with
"py C:\Users\madhu\OneDrive\Desktop\Megafile\Pythonprograms\Python.pyfiles\test.py" command and it returns with the error in the title.
py <file.py> wasn't intended to run scripts on server side. It rather runs files on in-game computers. Although I think it must report something more meaningful instead this error.
You still can import any module on the host from an in-game program. There're some ways to load file by path. Probably something like py --host .../file.py could be useful as well.
Activity
SriLikesToSing commentedon Apr 12, 2021
apockill commentedon Apr 15, 2021
Can you share the contents of
test.py?RAREGUN commentedon Mar 7, 2022
Same issue when trying to run
print('Hello world!')from file.Also have same error message when trying to run non-existent file.
RAREGUN commentedon Mar 14, 2022
My awkward solution is using
exec()function.Easy to use:
exec(open("path/file.py").read()), but hard to start again after reloading serverneumond commentedon Jun 13, 2026
py <file.py>wasn't intended to run scripts on server side. It rather runs files on in-game computers. Although I think it must report something more meaningful instead this error.You still can import any module on the host from an in-game program. There're some ways to load file by path. Probably something like
py --host .../file.pycould be useful as well.