MuellerConstantin / PyQvd

Utility library for reading/writing Qlik View Data (QVD) files in Python.
https://pypi.org/project/PyQvd/
MIT License
12 stars 1 forks source link

Error in import of "from pyqvd import QvdDataFrame" #1

Closed mrRobot62 closed 6 months ago

mrRobot62 commented 6 months ago

Hi, I try to work with this libray, unfortunately I got below error message on loading the lib

Error: Exception has occurred: TypeError unsupported operand type(s) for |: 'type' and 'NoneType' File "/home/user/biap_pocs/biap_qlik_qvd_worker/qvd.py", line 3, in <module> from pyqvd import QvdDataFrame TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Environment: Python 3.8.12 on a GCP-Environment (currently not possible to update to newer version)

Operating System: Linux-Debian

Source-Code:

import pandas as pd 
import argparse
from pyqvd import QvdDataFrame # error raised here

My thoughts It seems it could be a Python version issue. Found this Git-Repo: TypeError: unsupported operand type(s) for |

It is possible to provide a version for Python 3.8 ?

MuellerConstantin commented 6 months ago

Hi there, the latest PyQvd release (v1.0) is supposed to support Python from version 3.8. The error occurred directly when importing the module, right? I'll check it and try to reproduce your error.

MuellerConstantin commented 6 months ago

The problem was that the source code used the | operator for union typing, like str | None. This feature isn't supported in Python 3.8. For backwards compatibility, we switched to explicit typing with Union[str, None], which is also supported by Python 3.8. The problem should be fixed with the latest patch release (v1.0.1) with commit 2c0ae625b9f621a2766f46ba6a1c20d9410e98db.

mrRobot62 commented 6 months ago

ah ok - sounds good - will give it try

Thanks a lot for this very quick response