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

Intermediate Representation Malfunction in Docker and Terraform #60

Open
jperas243 opened this issue Sep 17, 2024 · 1 comment
Open

Comments

@jperas243
Copy link

Describe the bug

The intermediate representation is not being outputted in terraform and docker tech's

To Reproduce

 glitch --tech terraform --mode repr /Users/User/Desktop/Dissertation/Playground/vunerable_terraform.tf > ../Playground/logs.txt

glitch --tech docker --mode repr /Users/User/Desktop/Dissertation/Playground/vunerable_dockerfile > ../Playground/logs.txt

Expected behavior

The intermediate representation should be outputted

Screenshots
Screenshot 2024-09-17 at 16 21 29
Screenshot 2024-09-17 at 16 26 52

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.6.1
@Nfsaavedra Nfsaavedra changed the title Intermidiate Representation Malfunction in Docker and Terraform Intermediate Representation Malfunction in Docker and Terraform Sep 17, 2024
@sfondev
Copy link

sfondev commented Mar 7, 2025

Hello João, this error happens due to an incompatibility between the installed versions of the pandas and numpy libraries. Specifically what most likely happened was that you installed GLITCH via the first method presented on the README (i.e using python -m pip install -e . in the project directory), and when installing this way it relies on pyproject.toml file where the numpy version isn't locked and the pandas version that is locked and therefore is installed requires only that the numpy versions be numpy>=1.20.3 for python_version<'3.10', numpy>=1.21.0 for python_version>='3.10' and numpy>=1.23.2 for python_version>='3.11' (as per https://github.com/pandas-dev/pandas/blob/2e218d10984e9919f0296931d92ea851c6a6faf5/setup.cfg#L34-L37) this problem that appeared is due to a major version bump in numpy (1.x -> 2.x) that has changes that are binary incompatible with versions of pandas and other libraries expecting the 1.x ABI.

It can be fixed by simply installing a version of numpy on the 1.X series of versions. The latest being v1.26.5 at the time (EDIT: Despite being tagged on the numpy repository unfortunately this version didn't get released to PyPI so the version v1.26.4 is actually the latest numpy release in the 1.X version series with a pre-built release), but you can also install the version v1.26.4 which is the one explicitly locked for installation when installing using poetry, making that specific GLITCH installation method not affected by this problem. Hope this helps :)

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

2 participants