Skip to content

Conversation

@BruRdgz
Copy link

@BruRdgz BruRdgz commented Aug 19, 2025

Closes #306

Summary

  • Installing cloudscraper 3.0.0 from the Git tag on Windows failed during the PEP 517 build with a UnicodeDecodeError due to default cp1252 decoding.
  • This PR forces UTF-8 when reading package files in setup.py, unblocking builds/installs on Windows.

Changes

  • setup.py: read cloudscraper/init.py and README.md with encoding="utf-8".
    • No behavioral/runtime changes.
    • No dependency changes.

Testing

  • Environment: Windows 11, Python 3.13, pip 25.2, build 1.2+, Poetry 2.1.4.
  • Built artifacts locally:
    • python -m build → produced sdist (.tar.gz) and wheel (.whl).
  • Verified installation paths:
    • Wheel: python -m pip install dist/cloudscraper-3.0.0-py3-none-any.whl
    • sdist (PEP 517 path): python -m pip install --no-binary :all: dist/cloudscraper-3.0.0.tar.gz
  • Runtime check:
    • python -c "import cloudscraper; print(cloudscraper.__version__)" → 3.0.0
  • Also validated install via Poetry in a downstream project from the Git ref.

@BruRdgz
Copy link
Author

BruRdgz commented Aug 19, 2025

It was incredibly trivial, so I went ahead and wrote the fix myself for convenience's sake.
Do feel free to test those changes locally.
Let me know if there's any issues.

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

Successfully merging this pull request may close these issues.

Unable to install cloudscraper 3.0.0 from Git on Windows (PEP 517 build fails with UnicodeDecodeError); 3.0.0 not on PyPI

1 participant