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
when i use this script in myscript.py, this is working as expected.
import random
import string
print("\n".join("".join(random.choices(string.ascii_uppercase, k=1024))))
when i use this script in myscript.py,
import random
import string
print("\n".join("".join(random.choices(string.ascii_uppercase, k=1024)) for _ in range(1024)))
i am getting below error,
Traceback (most recent call last):
File "python_runner.py", line 56, in
execute_script_file_with_timeout()
File "/home/user1/.local/lib/python3.8/site-packages/timeout_decorator/timeout_decorator.py", line 82, in new_function
return function(*args, **kwargs)
File "python_runner.py", line 55, in execute_script_file_with_timeout
exec(open(myscript.py).read())
File "", line 7, in
File "", line 7, in
NameError: name 'random' is not defined
Thanks, Raghu
The text was updated successfully, but these errors were encountered:
Hi,
Here in python_runner.py file i am reading a python file(myscript.py) and running the script with timeout.
python_runner.py:
when i use this script in myscript.py, this is working as expected.
when i use this script in myscript.py,
i am getting below error,
Traceback (most recent call last):
File "python_runner.py", line 56, in
execute_script_file_with_timeout()
File "/home/user1/.local/lib/python3.8/site-packages/timeout_decorator/timeout_decorator.py", line 82, in new_function
return function(*args, **kwargs)
File "python_runner.py", line 55, in execute_script_file_with_timeout
exec(open(myscript.py).read())
File "", line 7, in
File "", line 7, in
NameError: name 'random' is not defined
Thanks, Raghu
The text was updated successfully, but these errors were encountered: