Comments (5)
@azec-pdx , I'm using an M series MacOS device and I was able to use the code on your branch (commit azec-pdx@a2be61e) and was able to get around this same problem for myself. Thank you!
from safaribooks.
@lorenzodifuccia && @ivanpagac ,
I believe there is a set of problems introduced with later versions of Python that LXML hasn't addressed yet.
I am watching the following:
- https://bugs.launchpad.net/lxml/+bug/1949271
- https://github.com/Donohue/medium-to-jekyll/pull/4/files
- Donohue/medium-to-jekyll#3
Regardless of this external change in lxml, I found the issue in this project with handling emojis and other special unicode characters when requesting lxml to parse the document, for the versions of Python with which lxml behaves well.
I have addressed the issue in https://github.com/azec-pdx/safaribooks/tree/apiv2 .
I was able to confirm positive results with testing on Book with IDs: 9781098156817
and 9781617297274
which both have some emojis and other offending characters. However, I was able to only get the parsing right with Python 3.9.16 and while using Python 3.9.10, it is still broken (I believe because of the additional issue linked above).
from safaribooks.
I've had different behaviors of lxml
on same Python version between macOS running Apple M1 chip and macOS running Apple Intel chip. On M1 macOS, it basically errors as described above and my branch is handling that now, but on Intel macOS it never errors out.
from safaribooks.
@azec-pdx thank you, is there a version of lxml (fixing Python at 3.9.x), where this error can be avoided? If so, patching requirements.txt to that version of lxml may allow users to locally work around this problem, until a formal PR resolving it, gets merged.
from safaribooks.
#347 fixed this issue.
from safaribooks.
Related Issues (20)
- Downloading from public library providing Oreilly subscription HOT 1
- Images from books are corrupt HOT 3
- Auth Failure. - Unexpected error! HOT 3
- flask3.9 ImportError: cannot import name 'escape' from 'jinja2' HOT 1
- Authentication issue: unable to access profile page. HOT 8
- Cannot sudo rm -rf some .log file so cannot download my book HOT 1
- Parser: book content's corrupted or not present: ch01.xhtml
- Unhandled Exception: 'rights' (type: KeyError) HOT 1
- Trial account not working due to email issue HOT 2
- Error trying to parse this page
- SSO, Company, University, etc., Login Problems: *READ BEFORE NEW ISSUE* HOT 1
- Every chapter only has first page HOT 1
- Parser: book content's corrupted or not present
- download all books in specific playlist
- Is it normal normal that the program can't login after 10 minutes? HOT 23
- Table titles appear vertically HOT 1
- Stuck at login HOT 1
- 'Connection aborted.', RemoteDisconnected('Remote end closed connection without response') HOT 1
- Still being maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from safaribooks.