(-it in your command line should actually be: -d it. But that is not the main issue.)
The main issue is that your python environment is not set up properly. I am not an expert on that, but as far as I know, urllib3 and six need to be installed with the same package path. You can check with pip list -v, if they are (which they are probably not in your case). Maybe someone else here can help how to set it straight.
(Actually the instructions in README about using pip3 install -r requirements.txt might not be compatible with this issue between urllib3 and six. Maybe some python experts here can help to provide a more robust way to ensure a correct python environment ).
I have updated requirements.txt so that requests now needs to be 2.32.3. (Not sure if this actually fixes anything, but I had some strange error messages about incompatibility).
I get a running virtual python environment with the following commands on Linux (and after having installed venv):
cd [to the directory of portfolio-classifier.py]
python -m venv ppc-env # ppc-env is the name of the new virtual environment
source ppc-env/bin/activate
pip3 install -r requirements.txt
python portfolio-classifier.py test/multifaktortest.xml # or any other use of the script
[...]
deactivate # to exit the virtual environment
I guess it is slightly different on Windows (especially executing the activate command), but maybe it helps nevertheless.
After that, the following commands are sufficient to run the script:
cd [to the directory of portfolio-classifier.py]
source ppc-env/bin/activate
python portfolio-classifier.py test/multifaktortest.xml # or any other use of the script
[...]
deactivate # to exit the virtual environment
Another note here: I recently upgraded to Ubuntu 24.04.1 LTS. This led to Python environment being managed by debian and I ran into same issues with six and urllib3. If I remember correctly, I resolved it in the following way:
Maybe a general caveat here: The taxonomies for ETFs and other funds are assigned according to their current value. Especially if there is a mix of classifications (different sectors/regions/countries), the individual numbers will typically change over time. However, PP will only have the current values and does not “remember” the previous ones. So any graphs that show e.g. performance per classification over time might be pretty misleading.
Theoretical example: If your portfolio only contains a single ETF which contains two shares, one in sector A and the other in sector B, then any performance graph of your portfolio will show the same performance for sector A and for sector B while in reality the share in sector A might haven fallen dramatically while the share in sector B might have soared (changing the percentage values for sectors A and B over time in the ETF).
So the classification is good to assess the current distribution within your portfolio, but don’t read too much into it when you you look at time series of classifications for portfolios with funds where classifications are changing over time.