TAcharts icon indicating copy to clipboard operation
TAcharts copied to clipboard

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Open x011 opened this issue 3 years ago • 3 comments

i.build(20, 60, 120, 30) File "C:\Python38\lib\site-packages\tacharts-0.0.30-py3.8.egg\TAcharts\indicators\ichimoku.py", line 90, in build self._build_lines(tenkan=tenkan_interval, kijun=kijun_interval) File "C:\Python38\lib\site-packages\tacharts-0.0.30-py3.8.egg\TAcharts\indicators\ichimoku.py", line 58, in _build_lines high = sma(self.df["high"], val, "max") File "C:\Python38\lib\site-packages\tacharts-0.0.30-py3.8.egg\TAcharts\wrappers.py", line 34, in wrapper if oldSeries: File "C:\Python38\lib\site-packages\pandas\core\generic.py", line 1442, in nonzero raise ValueError( ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

x011 avatar Apr 20 '21 21:04 x011

Hello, I have the same issue.

mustaffa avatar May 12 '21 23:05 mustaffa

@x011 Change the line containing if oldSeries: in C:\Python38\lib\site-packages\tacharts-0.0.30-py3.8.egg\TAcharts\wrappers.py to if oldSeries.any():.

fx86 avatar Jun 07 '21 07:06 fx86

@x011 Change the line containing if oldSeries: in C:\Python38\lib\site-packages\tacharts-0.0.30-py3.8.egg\TAcharts\wrappers.py to if oldSeries.any():.

I did make that change as mentioned but now i am getting: AttributeError: 'NoneType' object has no attribute 'any' Please advise

ZaphodBeeblebrox12 avatar Sep 03 '21 05:09 ZaphodBeeblebrox12