Giter VIP home page Giter VIP logo

Comments (4)

mildaniel avatar mildaniel commented on June 5, 2024

Hi @Hanna-Hinn-imVitro, can you provide a minimal sample application for us to reproduce the issue?

from aws-sam-cli.

Hanna-Hinn avatar Hanna-Hinn commented on June 5, 2024

Hey, here's the minimal sample application :
Here's the project structure

|── helpers
|  ├── adapters
|  |  ├── adapters
|  |  ├── adapters.egg-info
|  |  ├── setup.py
|  |  |
|── domain
|  ├── bin
|  ├── tests
|  ├── src
|  |  ├── functions
|  |   ├── function1
|  |   | ├── __init__.py
|  |   | ├── handler.py
|  |   | ├── requirements.txt
|  |   ├── __init__.py
|  |  ├── __init__.py
|  |
|  ├── tests
|  ├── template.yaml
|  ├── ... other files

example on the requirements:

-e ../helpers/adapters
dataclasses-json==0.5.2
pycryptodome==3.16.0

Here's the overall requirements.txt for the whole project:

dataclasses-json==0.5.2
pytest==6.1.2
-e helpers/adapters
numpy==1.20.1
boto3==1.16.25
moto==1.3.16
dynamodb-encryption-sdk==1.2.0
pytest-mock==3.5.1
requests-mock==1.8.0
python_dynamodb_lock==0.9.1
pandas==1.3.4
opencv-python-headless==4.5.5.62
pillow==9.0.1
pycryptodome==3.16.0
aiohttp==3.8.1
aiohttp-retry==2.5.2
requests==2.25.1
aws-lambda-powertools[all]==2.8.0
pytest-cov==4.0.0
pydantic==1.10.13
asynctest==0.13.0
pytest-asyncio==0.20

The project is a bit old. I have a theory regarding some dependency version between 2 libraries but I can not figure it out :(. tbh I do not know how exactly can I help you reproduce the issue.

from aws-sam-cli.

mildaniel avatar mildaniel commented on June 5, 2024

Hi @Hanna-Hinn, I did some more digging and this is what I found.

  1. For the local dependencies, make sure that the library is being passed into the CodeURI. SAM CLI will move the CodeURI into a temporary scratch directory to build, and if the local dependency is outside of that, relative paths outside of the CodeURI won't be found. You can see an example of local dependencies being used in the Lambda Builders integration tests.
  2. For the rest of the dependencies, there was a bug fixed in version 1.95.0 of SAM CLI that should address the issue you're having, try updating to the latest version and seeing if that helps. However, there does seem to be an issue with one of the dependencies of dataclasses-json, depending on the version of pip you are using. stringcase==1.2.0 uses a deprecated pip feature which prevents Lambda Builders from building a wheel. There isn't much we can do for it since it doesn't contain any wheels we can use and we can't change the pip behaviour.

Let us know if this helps.

from aws-sam-cli.

Hanna-Hinn avatar Hanna-Hinn commented on June 5, 2024

Okay thank you so much 🙏

from aws-sam-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.