holoviz / holoviz/param

print reactive expression: TypeError: __str__ returned non-string (type rx)

Open
#1,010 2 comments 0 reactions 0 assignees View on GitHub
type-bug
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

I'm on the latest `main` branch of param. When trying to print a reactive expression it raises an exception

```python
import param
rx_value = param.rx(10)
print(rx_value)
```

```bash
Traceback (most recent call last):
File "/home/jovyan/repos/private/param/script.py", line 3, in
print(rx_value)
TypeError: __str__ returned non-string (type rx)
```

The workaround is to print `rx_value.rx.value` instead. But this would be confusing to a lot of users. Please fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.