fix: fixes collections module import in getpy.py for python3.10#11
Open
nfiawornu wants to merge 1 commit intoHAKSOAT:masterfrom
Open
fix: fixes collections module import in getpy.py for python3.10#11nfiawornu wants to merge 1 commit intoHAKSOAT:masterfrom
nfiawornu wants to merge 1 commit intoHAKSOAT:masterfrom
Conversation
|
+1 for merging this. Error without the merge: --- Epub to PDF conversion started
Traceback (most recent call last):
File "/home/parallels/devlocal/dev-oss/EpubToPdf/main.py", line 39, in <module>
process()
File "/home/parallels/devlocal/dev-oss/EpubToPdf/main.py", line 18, in process
engine.get_all()
File "/home/parallels/devlocal/dev-oss/EpubToPdf/getpy.py", line 80, in get_all
xml_tree = bs(xml_content, features = "xml")
File "/home/parallels/devlocal/dev-oss/EpubToPdf/.env/lib/python3.10/site-packages/bs4/__init__.py", line 228, in __init__
self._feed()
File "/home/parallels/devlocal/dev-oss/EpubToPdf/.env/lib/python3.10/site-packages/bs4/__init__.py", line 289, in _feed
self.builder.feed(self.markup)
File "/home/parallels/devlocal/dev-oss/EpubToPdf/.env/lib/python3.10/site-packages/bs4/builder/_lxml.py", line 131, in feed
self.parser = self.parser_for(self.soup.original_encoding)
File "/home/parallels/devlocal/dev-oss/EpubToPdf/.env/lib/python3.10/site-packages/bs4/builder/_lxml.py", line 61, in parser_for
if isinstance(parser, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'Non Error output after merging this PR: --- Epub to PDF conversion started
--- Sections converted to pdf
--- Sections combined together in a single pdf file
--- Individual pdf files deleted from directory
--- Epub to PDF conversion successfulNote I did not test this on anything but |
|
This is apparently caused by having a version of Python that's too new (3.10 for me as well). Also resolved by updating BS4. I forked this repo so I could add that change and some other stuff, patience was never my strong suit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was getting a collections.Callable error when I first run the project. This was how I was able to fix that error.