Git Product home page Git Product logo

Comments (13)

eerkunt avatar eerkunt commented on May 24, 2024

I would suspect this is a problem of radish, would it be possible if I have radish version from your environment ?

# radish -v
# pip show radish

from cli.

msaadkhan31 avatar msaadkhan31 commented on May 24, 2024

$ pip show radish
Name: radish
Version: 0.1.10
Summary: A set of common tools for testing django projects with lettuce.
Home-page: http://ff0000.com/
Author: Red Interactive
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python2.7/dist-packages
Requires: selenium, random-instances
Required-by: terraform-compliance

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

what about radish-bdd ?

Would it be possible if you uninstall and install it again, or use the docker version of terraform-compliance ?

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

I mean uninstall and install of radish & radish-bdd not terraform-compliance

and I strongly recommend to use the docker version to avoid environmental problems like these.

from cli.

msaadkhan31 avatar msaadkhan31 commented on May 24, 2024

$ pip show radish-bdd
Name: radish-bdd
Version: 0.8.6
Summary: Behaviour-Driven-Development tool for python
Home-page: http://radish-bdd.io
Author: Timo Furrer
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: radish-parse-type, docopt, humanize, colorful, tag-expressions, pysingleton
Required-by: terraform-compliance

from cli.

msaadkhan31 avatar msaadkhan31 commented on May 24, 2024

Sure let me try with uninstalling and installing it again

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

Did it work after you re-installed radish-bdd and radish ?

from cli.

msaadkhan31 avatar msaadkhan31 commented on May 24, 2024

no, still facing the same issue

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

Tried to install terraform-compliance to a clean virtual environment and had the same problem.

Here is how I fixed it;

Initial run ;

~ via test
➜ terraform-compliance -h
Traceback (most recent call last):
  File "/Users/sharky/test/bin/terraform-compliance", line 7, in <module>
    from terraform_compliance.main import cli
  File "/Users/sharky/test/lib/python2.7/site-packages/terraform_compliance/main.py", line 3, in <module>
    from radish.main import main as call_radish
  File "/Users/sharky/test/lib/python2.7/site-packages/radish/main.py", line 12, in <module>
    from . import __VERSION__
ImportError: cannot import name __VERSION__

Here I uninstall radish and radish-bdd

~ via test
➜ pip uninstall radish radish-bdd
Uninstalling radish-bdd-0.8.6:
  Would remove:
    /Users/sharky/test/bin/radish
    /Users/sharky/test/bin/radish-test
    /Users/sharky/test/lib/python2.7/site-packages/radish/*
    /Users/sharky/test/lib/python2.7/site-packages/radish_bdd-0.8.6.dist-info/*
    /Users/sharky/test/lib/python2.7/site-packages/tests/*
  Would not remove (might be manually added):
    /Users/sharky/test/lib/python2.7/site-packages/radish/dirt.py
    /Users/sharky/test/lib/python2.7/site-packages/radish/features/__init__.py
    /Users/sharky/test/lib/python2.7/site-packages/radish/features/admin.feature
    /Users/sharky/test/lib/python2.7/site-packages/radish/features/admin.py
    /Users/sharky/test/lib/python2.7/site-packages/radish/features/base.py
    /Users/sharky/test/lib/python2.7/site-packages/radish/settings.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/__init__.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/common/__init__.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/common/test_helper.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/common/test_pyhcl_helper.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/extensions/__init__.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/extensions/test_terraform_validate.py
    /Users/sharky/test/lib/python2.7/site-packages/tests/terraform_compliance/test_main.py
Proceed (y/n)? y
  Successfully uninstalled radish-bdd-0.8.6
Uninstalling radish-0.1.10:
  Would remove:
    /Users/sharky/test/lib/python2.7/site-packages/radish-0.1.10.dist-info/*
    /Users/sharky/test/lib/python2.7/site-packages/radish/dirt.py
    /Users/sharky/test/lib/python2.7/site-packages/radish/features/*
    /Users/sharky/test/lib/python2.7/site-packages/radish/settings.py
Proceed (y/n)? y
  Successfully uninstalled radish-0.1.10

Re-installing again ;

~ via test took 3s
➜ pip install radish radish-bdd
Collecting radish
Collecting radish-bdd
  Using cached https://files.pythonhosted.org/packages/a6/c0/2b857d7acc0cfeec791a821570645b74c2f6f7b6ee07c20e171a9bc2fc9a/radish_bdd-0.8.6-py2.py3-none-any.whl
Requirement already satisfied: selenium in ./test/lib/python2.7/site-packages (from radish) (3.14.1)
Requirement already satisfied: random-instances in ./test/lib/python2.7/site-packages (from radish) (0.0.3)
Requirement already satisfied: colorful>=0.3.11 in ./test/lib/python2.7/site-packages (from radish-bdd) (0.4.2)
Requirement already satisfied: tag-expressions>=1.0.0 in ./test/lib/python2.7/site-packages (from radish-bdd) (1.1.0)
Requirement already satisfied: pysingleton in ./test/lib/python2.7/site-packages (from radish-bdd) (0.2.1)
Requirement already satisfied: radish-parse-type>0.3.4 in ./test/lib/python2.7/site-packages (from radish-bdd) (0.3.5)
Requirement already satisfied: humanize in ./test/lib/python2.7/site-packages (from radish-bdd) (0.5.1)
Requirement already satisfied: docopt in ./test/lib/python2.7/site-packages (from radish-bdd) (0.6.2)
Requirement already satisfied: urllib3 in ./test/lib/python2.7/site-packages (from selenium->radish) (1.24)
Requirement already satisfied: enum34 in ./test/lib/python2.7/site-packages (from radish-parse-type>0.3.4->radish-bdd) (1.1.6)
Requirement already satisfied: six in ./test/lib/python2.7/site-packages (from radish-parse-type>0.3.4->radish-bdd) (1.11.0)
Requirement already satisfied: parse>=1.6 in ./test/lib/python2.7/site-packages (from radish-parse-type>0.3.4->radish-bdd) (1.9.0)
Installing collected packages: radish, radish-bdd
Successfully installed radish-0.1.10 radish-bdd-0.8.6

and here I run it again ;

~ via test took 2s
➜ terraform-compliance -h
usage: terraform-compliance [-h] --features feature_directory --tfdir
                            terraform_directory [--identity [ssh_private_key]]
                            [--version]

BDD Test Framework for Hashicorp terraform

optional arguments:
  -h, --help            show this help message and exit
  --features feature_directory, -f feature_directory
                        Directory consists of BDD features
  --tfdir terraform_directory, -t terraform_directory
                        Directory (or git repository with 'git:' prefix)
                        consists of Terraform Files
  --identity [ssh_private_key], -i [ssh_private_key]
                        SSH Private key that will be use on git
                        authentication.
  --version, -v         show program's version number and exit

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

I will have look thoroughly on the problem, I suspect some stuff that may cause this problem. Will update this ticket when I found a solution.

Meanwhile, you can use the workaround I used above or you can just use the Docker version of terraform-compliance that would fix the problem completely.

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

The problem fixed on 0.4.3 version.
https://github.com/eerkunt/terraform-compliance/releases/tag/0.4.3

Please update your terraform-compliance.

from cli.

tenderitaf avatar tenderitaf commented on May 24, 2024

re-opining this one as it occurred with latest version of terraform-compliance.
I'm building my own image based on your dockerfile. issue above happened. after reinstalling radish and radish-bdd. it was then working.

from cli.

eerkunt avatar eerkunt commented on May 24, 2024

I think the problem is on radish and radish-bdd doesn't work together well :) Whenever we install radish instead of radish-bdd we have this problem, hence we removed radish from our requirements.txt.

Couldn't reproduced the problem, would it be possible if you were installing radish additionally on the Dockerfile ?

from 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.