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
{{ message }}
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
The following code works fine on my host machine (no jumpscale) python 3.6.7
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: def add(a, b):
...: return a + b
...:
In [2]: import inspect
In [3]: inspect.getsource(add)
Out[3]: 'def add(a, b):\n return a + b\n'
The same code does not work on jumpscale on python3, ptpython , nor kosmos
JSX> import inspect
JSX> def add(a, b):
2 return a + b
JSX> inspect.getsource(add)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/inspect.py", line 973, in getsource
lines, lnum = getsourcelines(object)
File "/usr/lib/python3.6/inspect.py", line 955, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python3.6/inspect.py", line 786, in findsource
raise OSError('could not get source code')
OSError: could not get source code
could not get source code
why this is important? because it affects calling j.servers.myjobs.schedule from kosmos
JSX> def add(a, b):return a + b
JSX> j.servers.myjobs.schedule(add, 1,2)Thu 22 09:27:33 InstallTools.py -1688 - execute : execute:whoami
Thu 22 09:27:33 InstallTools.py -1688 - execute : execute:cat /proc/1/cgroup
JSX> j.servers.myjobs.schedule(add, 1,2)
executing method add with *args (1, 2) and **kwargs {}
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/DigitalMe/servers/myjobs/MyJobs.py", line 384, in schedule
code = inspect.getsource(method)
File "/usr/lib/python3.6/inspect.py", line 973, in getsource
lines, lnum = getsourcelines(object)
File "/usr/lib/python3.6/inspect.py", line 955, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python3.6/inspect.py", line 786, in findsource
raise OSError('could not get source code')
OSError: could not get source code
could not get source code
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code works fine on my host machine (no jumpscale) python 3.6.7
The same code does not work on jumpscale on python3, ptpython , nor kosmos
why this is important? because it affects calling
j.servers.myjobs.schedule
from kosmosThe text was updated successfully, but these errors were encountered: