python-jsonschema / jsonschema

An implementation of the JSON Schema specification for Python
https://python-jsonschema.readthedocs.io
MIT License
4.58k stars 578 forks source link

ModuleNotFoundError: No module named 'rpds.rpds' #1175

Closed salahaz closed 11 months ago

salahaz commented 11 months ago

The following issue is raised when importing jsonschema from the latest release of v.4.19.1. I used to work with v4.17.0 and there were no issues. Any fix ?

rpds

Julian commented 11 months ago

Please share something which reproduces, as everything works fine here.

amirbtb commented 11 months ago

Hi, I have the same error. Here is my environment :

Julian commented 11 months ago

Lambda isn't a supported environment inasmuch as it isn't something that runs in CI here, and I don't personally have access or test on it. Everything may work there (and it seems likely it does, given I know many users do use it) but I don't directly support it even at the level that I provide support at all. Please provide some reproducer that doesn't involve it -- something that I can run which produces the behavior you're indicating.

amirbtb commented 11 months ago

According to this stackoverflow, the issue appeared with 4.18 : https://stackoverflow.com/questions/76667202/aws-lambda-function-cant-find-module. I'll try setting up a Dockerfile with everything required to test this use case.

Julian commented 11 months ago

rpds as a dependency was introduced in 4.18, so that's not surprising. Feel free to follow up if you have a reproducer. Going to close for now, as I don't believe anything is wrong with the package itself, I suspect it's Lambda doing wrong things on installation, but if that turns out to not be the case happy to look into things with the reproducer.

CynanX commented 7 months ago

I am seeing this also when using AWS ZIP lambdas or AWS sam local. AWS Docker lambdas are working fine.

I can knock together a project demonstrating this using AWS sam local if that helps?