Closed nikoltoll closed 1 year ago
I am not a python expert, but by googling this, it seems that it's an issue with Python versions pre 3.10, see e.g. https://github.com/tiangolo/typer/issues/371
The examples runs fine on my end with Python 3.11.3. I guess you are on 3.9 or earlier?
Yes the Python version was the problem. I substituted all | by ‘or’, but then I got an error that explain returned four arguments instead of three. This was easily solved by adding a fourth argument. This turned out to be timing info coming from R. Now it works, thanks!
Great! Feel free to add a PR if you believe substituting | by or is a fix that works on more python versions.
Seems like I forgot to update some of the examples after expanding the output from the function call. Will fox that.
When I run an example, for instance sklearn_regressor.py, I get the following error in explain.py:
File c:\users\nikur\code\shapr\python\shaprpy\explain.py:30 n_combinations: int | None = None,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'