serverless / serverless-python-requirements

⚡️🐍📦 Serverless plugin to bundle Python packages
MIT License
1.11k stars 290 forks source link

flask-restplus jsonschema installation fails #355

Open 1oglop1 opened 5 years ago

1oglop1 commented 5 years ago

Hi, thanks for the great plugin! I have some problem with the installation of flask-restplus and it's dependencies. all works fine with serverless-wsgi offline but after sls deploy,

I get this error when I access the URL of the deployed app.

pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application

I tried to apply workaround suggested here https://stackoverflow.com/questions/54879457/pkg-resources-distributionnotfound-jsonschema

pin the version of jsonschema==2.6.0.

ets commented 5 years ago

@1oglop1 I encountered this as well. Setting the "slim" option to false resolved it for me. I'll try to play with the slimPatterns to determine which is interfering with jsonschema.

1oglop1 commented 5 years ago

That's a good find! Thank you for digging in. I often use "slim" packages until they grow to the level where I cannot edit function inside the console.

lbustelo commented 4 years ago

I'm having same issue but slim: false does not do it. I'm using zip:true and that one I really need.

hectormirete commented 3 years ago

This happened to me also with jsonschema==3.2.0 and slim: true. Solved removing the slim parameter