Cannot define csp nodes/graphs in raw python interpreter
Open
Nobody has claimed this yet.
type: bug
- Dominant language
- Python
- Stars
- 441
- Forks
- 90
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 5
Description
reported in https://github.com/Point72/csp/issues/88#issuecomment-1959057012
Python 3.8.10 | packaged by conda-forge | (default, Sep 13 2021, 21:46:58)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import csp
>>> import pandas
>>> from datetime import datetime
>>> @csp.graph
... def foo(x: pandas.DataFrame):
... pass
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/csp/csp/impl/wiring/graph.py", line 393, in graph
return _impl(func)
File "/csp/csp/impl/error_handling.py", line 37, in __exit__
raise exc_val.with_traceback(new_tb)
OSError: could not get source code
>>>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in a raw Python interpreter using the example from the issue, then inspect csp/impl/wiring/graph.py around the graph decorator. Confirm that defining the shown graph no longer raises "could not get source code" when run interactively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100