Skip to content

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

Open
@MarcSkovMadsen

Description

@MarcSkovMadsen

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

import param
rx_value = param.rx(10)
print(rx_value)
Traceback (most recent call last):
  File "/home/jovyan/repos/private/param/script.py", line 3, in <module>
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions