This code appears to work in jupiter notebook but when i have slightly adapted the input tables i am getting the following error,
Executing the Python script failed: Traceback (most recent call last):
File “”, line 6, in
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\frame.py”, line 8913, in stack
result = stack(self, level, dropna=dropna)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\reshape\reshape.py”, line 607, in stack
new_values = frame._values.ravel()
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\generic.py”, line 5902, in getattr
return object.getattribute(self, name)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\frame.py”, line 970, in _values
return self.values
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\generic.py”, line 5902, in getattr
return object.getattribute(self, name)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\frame.py”, line 11736, in values
return self._mgr.as_array()
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\internals\managers.py”, line 1767, in as_array
arr = self._interleave(dtype=dtype, na_value=na_value)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\internals\managers.py”, line 1814, in _interleave
arr = blk.get_values(dtype)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\internals\blocks.py”, line 1604, in get_values
values = values.astype(object)
File “C:\Knime\knime_4.7.1\plugins\org.knime.python3.arrow_4.7.1.v202301311311\src\main\python\knime_arrow_pandas.py”, line 918, in astype
return super().astype(dtype, copy)
File “C:\Knime\knime_4.7.1\plugins\org.knime.pythonscripting.channel.v1.bin.win32.x86_64_4.7.1.v202301201518\env\lib\site-packages\pandas\core\arrays\base.py”, line 610, in astype
return np.array(self, dtype=dtype, copy=copy)
File “C:\Knime\knime_4.7.1\plugins\org.knime.python3.arrow_4.7.1.v202301311311\src\main\python\knime_arrow_pandas.py”, line 951, in array
[self[i] for i in range(len(self))],
File “C:\Knime\knime_4.7.1\plugins\org.knime.python3.arrow_4.7.1.v202301311311\src\main\python\knime_arrow_pandas.py”, line 951, in
[self[i] for i in range(len(self))],
File “C:\Knime\knime_4.7.1\plugins\org.knime.python3.arrow_4.7.1.v202301311311\src\main\python\knime_arrow_pandas.py”, line 628, in getitem
return self._data[item].as_py()
File “C:\Knime\knime_4.7.1\plugins\org.knime.python3.arrow_4.7.1.v202301311311\src\main\python\knime_arrow_types.py”, line 463, in as_py
return self._ext_type.decode(self.value.as_py())
AttributeError: ‘NoneType’ object has no attribute ‘as_py’
Does anyone have any ideas ?