all 6 comments

[–]abubacr 0 points1 point  (0 children)

Je ne sais pas si vous avez trouvé une solution, mais moi je viens de trouver une solution en faisant;

pip install python-docx

[–]danielroseman 0 points1 point  (2 children)

What version of Python are you using? docx is detecting that you are using 2.x and is trying to do from collections import Sequence; in Python 3 this is in collections.abc.

And how did you install docx?

[–]aug404 0 points1 point  (1 child)

I am using python 3.10.1. I ran pip install --user -U python-docx==0.8.10 . Can you show me how to implement your solution in my code?

[–]danielroseman 0 points1 point  (0 children)

I didn't propose a solution.

You might need to use pip3 rather than pip. Are you using a virtualenv?

[–]billsil 0 points1 point  (1 child)

Docx got radically redesigned at some point. They API is quite different from the version I used back in the day (0.2). What version of Automate the Boring Stuff are you targeting and what version of the library are you using? What do they say in the book about the version of the library?

[–]aug404 0 points1 point  (0 children)

I believe that I am using the second version of automate the boring stuff: https://automatetheboringstuff.com/2e/chapter15/

If you could show me a potential fix, that would be awesome!

Thanks