Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name zip_longest #115

Closed
AnonDev1312 opened this issue Sep 1, 2020 · 4 comments
Closed

ImportError: cannot import name zip_longest #115

AnonDev1312 opened this issue Sep 1, 2020 · 4 comments

Comments

@AnonDev1312
Copy link

I'm getting this error when trying to export on CentOs 8 ... can't find a solution on google :(

[root@server discogs-xml2db]# python run.py --export artist --bz2
Traceback (most recent call last):
File "run.py", line 18, in
from discogsxml2db.exporter import main
File "/var/www/vhosts/x.net/discogs-xml2db/discogsxml2db/exporter.py", line 10, in
from .parser import DiscogsArtistParser, DiscogsLabelParser, DiscogsMasterParser, DiscogsReleaseParser
File "/var/www/vhosts/x.net/discogs-xml2db/discogsxml2db/parser.py", line 2, in
from itertools import zip_longest
ImportError: cannot import name zip_longest

@philipmat
Copy link
Owner

philipmat commented Sep 1, 2020

Please post the output of the following commands:

  • git show --oneline -s (execute in the same directory as run.py)
  • python -V
  • python -c "import itertools; dir(itertools)"

@AnonDev1312
Copy link
Author

Thanks for the reply,

Here is the result of the commands

[root@server discogs-xml2db]# git show --oneline -s
fatal: not a git repository (or any of the parent directories): .git
[root@server discogs-xml2db]# python -V
Python 2.7.17
[root@server discogs-xml2db]# python -c "import itertools; dir(itertools)"
[root@server discogs-xml2db]#

I didn't install xml2db with git, I just downloaded the zip and uploaded it to my server.

@philipmat
Copy link
Owner

Develop currently contains the speed up version, which requires python 3.6 at a minimum.

Master and tag v1.99 still contain a version that works with python 2.7, thought it's the slower variant. Also no longer maintained.

@philipmat
Copy link
Owner

You forgot to pass the input folder as parameter. Also the output folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants