In fase di calcolo peso spedizione esce il seguente errore:
[01-09-2023 14:44:11] INFO Creazione CSV './Documenti.csv' terminata..
D:\Progetti\danea-automation\.venv\lib\site-packages\pandas\core\dtypes\missing.py:225: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
return _isna_array(np.asarray(obj), inf_as_na=inf_as_na)
[01-09-2023 14:44:11] ERROR Errore in fase di calcolo peso totale
Traceback (most recent call last):
File "D:\Progetti\danea-automation\src\veryeasyfatt\app\main.py", line 162, in main
peso_totale = ureg.Quantity(df["TransportedWeight"].sum(), 'g')
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\plain\quantity.py", line 237, in __new__
magnitude = value.to(units)._magnitude
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\plain\quantity.py", line 522, in to
magnitude = self._convert_magnitude_not_inplace(other, *contexts, **ctx_kwargs)
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\plain\quantity.py", line 471, in _convert_magnitude_not_inplace
return self._REGISTRY.convert(self._magnitude, self._units, other)
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\plain\registry.py", line 911, in convert
return self._convert(value, src, dst, inplace)
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\context\registry.py", line 393, in _convert
return super()._convert(value, src, dst, inplace)
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\nonmultiplicative\registry.py", line 206, in _convert
return super()._convert(value, src, dst, inplace)
File "D:\Progetti\danea-automation\.venv\lib\site-packages\pint\facets\plain\registry.py", line 944, in _convert
raise DimensionalityError(src, dst, src_dim, dst_dim)
pint.errors.DimensionalityError: Cannot convert from 'dimensionless' (dimensionless) to 'gram' ([mass])
[01-09-2023 14:44:11] INFO Procedura terminata.
In fase di calcolo peso spedizione esce il seguente errore:
Il file
Documents.DefXml
è il seguente: