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

[Error] Emoji in markdown #7

Open
guedesfelipe opened this issue Jul 6, 2022 · 6 comments
Open

[Error] Emoji in markdown #7

guedesfelipe opened this issue Jul 6, 2022 · 6 comments

Comments

@guedesfelipe
Copy link
Contributor

guedesfelipe commented Jul 6, 2022

Config:

  • macos
  • python 3.10.5
  • lxml 4.9.1
  • beautifulsoup4 4.11.1
  • pyquery 1.4.3

Error in tag.text:

if tag.text and not isinstance(tag, lxml.etree._Comment):

image

I don't know why, but only with this configuration the error appears. I with python 3.8 and 3.9 works perfectly.

More infos you can see here

@alanhamlett
Copy link
Owner

Strange that it works with Python 3.10 on Linux but fails on Mac in your tests. Maybe it's a bug in how we open/read the test files on Mac, or maybe it's a bug in lxml on Mac.

@guedesfelipe
Copy link
Contributor Author

Yes, I think it's bug in lxml 4.9.1 with macOS and python 3.10 and I don't know why this error apear only with this configuration.

@scoder
Copy link

scoder commented Jul 10, 2022

@guedesfelipe, since you're comparing 3.10 with Python 3.8 and 3.9, did you download and install all three from the same place? Are all three using lxml 4.9.1, installed from the official wheels? If you're unsure, maybe you can retry this with clean venvs and check during the package installation that that's the case. It's CPython doing the decoding here, so I would like to rule out distribution specific differences.

@alanhamlett
Copy link
Owner

did you download and install all three from the same place?

Yes, he's using the actions/setup-python GitHub action with the python version matrix here:

https://github.com/guedesfelipe/readtime_cli/blob/0ac78114cb2358664a41ecd372b58a1ecf95df12/.github/workflows/ci.yml#L45

Are all three using lxml 4.9.1, installed from the official wheels?

Yes, lxml is installed with pip so it's using the official wheel since pip prefers wheel over source installs when selecting install candidates.

@scoder
Copy link

scoder commented Jul 11, 2022

Ok, this is because of https://bugs.launchpad.net/lxml/+bug/1980575.

I removed the Py3.10 macOS wheel from PyPI because it was built incorrectly, so pip now does a source build for Py3.10. This apparently leads to issues like this on GHA/macOS.

The macOS build of lxml is generally unmaintained and therefore the wheels provided as they are, without support. PRs are welcome to improve the situation, specifically to provide correct wheels on Py3.10 again.

@scoder
Copy link

scoder commented Oct 11, 2022 via email

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

3 participants