fast_dash icon indicating copy to clipboard operation
fast_dash copied to clipboard

simple example failed in Thonny IDE

Open rwblues opened this issue 1 year ago • 0 comments

  • Fast Dash version:
  • Python version:
  • Operating System:

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

installing is ok. But the example: from fast_dash import fastdash

@fastdash def text_to_text_function(input_text): return input_text

* Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)

does not run. It was executed in the Thonny-IDE and gave the following errors:

%Run -c $EDITOR_CONTENT Traceback (most recent call last): File "", line 4, in File "C:\Users\rwbdev\AppData\Roaming\Python\Python310\site-packages\fast_dash\fast_dash.py", line 539, in fastdash return decorator_fastdash(_callback_fn) File "C:\Users\rwbdev\AppData\Roaming\Python\Python310\site-packages\fast_dash\fast_dash.py", line 508, in decorator_fastdash return wrapper_fastdash( File "C:\Users\rwbdev\AppData\Roaming\Python\Python310\site-packages\fast_dash\fast_dash.py", line 504, in wrapper_fastdash app = FastDash(callback_fn=callback_fn, **kwargs) File "C:\Users\rwbdev\AppData\Roaming\Python\Python310\site-packages\fast_dash\fast_dash.py", line 140, in init self.output_labels = _infer_variable_names(callback_fn) File "C:\Users\rwbdev\AppData\Roaming\Python\Python310\site-packages\fast_dash\utils.py", line 421, in _infer_variable_names s = inspect.getsource(func) File "C:\Users\rwbdev\AppData\Local\Programs\Thonny\lib\inspect.py", line 1139, in getsource lines, lnum = getsourcelines(object) File "C:\Users\rwbdev\AppData\Local\Programs\Thonny\lib\inspect.py", line 1121, in getsourcelines lines, lnum = findsource(object) File "C:\Users\rwbdev\AppData\Local\Programs\Thonny\lib\inspect.py", line 958, in findsource raise OSError('could not get source code') OSError: could not get source code

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

rwblues avatar Mar 29 '24 17:03 rwblues