robinostlund / volkswagencarnet

A python library for volkswagen carnet
GNU General Public License v3.0
65 stars 36 forks source link

Type error in vw_utilities #259

Closed pahenning closed 4 months ago

pahenning commented 4 months ago

Hi, probably wrong package, but need to mention it anyhow:

Traceback (most recent call last): File "/root/carnet.py", line 2, in from volkswagencarnet.vw_connection import Connection File "/usr/local/lib/python3.9/dist-packages/volkswagencarnet/vw_connection.py", line 36, in from .vw_utilities import json_loads File "/usr/local/lib/python3.9/dist-packages/volkswagencarnet/vw_utilities.py", line 26, in def find_path_in_dict(src: dict | list, path: str | list) -> object: TypeError: unsupported operand type(s) for |: 'type' and 'type'

Regards

pah

stickpin commented 4 months ago

Hi @pahenning,

You need to update your python. As this library is mostly built to be used by Home Assistant integration, I would suggest you go all the way to v3.12.x.

BR.

pahenning commented 4 months ago

Hmmm. Upgraded to Python3.12.1, fine. But installation of volkswagencarnet still fails, because gcc crashes(!) when trying to install lxml (which is needed) in version lxml-5.2.1.

gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/local/include/python3.12 -c src/lxml/etree.c -o build/temp.linux-armv7l-cpython-312/src/lxml/etree.o -w gcc: fatal error: Getötet signal terminated program cc1

So not a problem of volkswagencarnet.

Regards

pah