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

Gauge Python Init #141

Closed
bszeliga opened this issue May 24, 2019 · 3 comments
Closed

Gauge Python Init #141

bszeliga opened this issue May 24, 2019 · 3 comments
Assignees
Labels

Comments

@bszeliga
Copy link

Description

When trying to init a new guage python project end up with NameError.

root@ce3c9df9328a:/gauge-py# gauge init python                                                                                     
Exception occurred while copying skel files.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/getgauge/impl_loader.py", line 40, in copy_skel_files
    shutil.copytree(os.path.join(SKEL, STEP_IMPL_DIR_NAMES[0]), impl_dirs[0])
NameError: global name 'STEP_IMPL_DIR_NAMES' is not defined
.
Error ----------------------------------

Failed to initialize project. exit status 1

Get Support ----------------------------
        Docs:          https://docs.gauge.org
        Bugs:          https://github.com/getgauge/gauge/issues
        Chat:          https://gitter.im/getgauge/chat

Your Environment Information -----------
        linux, 1.0.5, 562f036
        java (0.7.2), python (0.3.5)

Steps to reproduce

  1. gauge init python

Information that will help us debug

root@ce3c9df9328a:/gauge-py# gauge --version
Gauge version: 1.0.5
Commit Hash: 562f036

Plugins
-------
java (0.7.2)
python (0.3.5)
root@ce3c9df9328a:/gauge-py# python --version
Python 2.7.15rc1
root@ce3c9df9328a:/gauge-py# pip show getgauge 
Name: getgauge
Version: 0.3.5
Summary: Enables Python support for Gauge
Home-page: https://github.com/getgauge/gauge-python
Author: Gauge Team
Author-email: getgauge@outlook.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: six, parso, protobuf, redBaron, ptvsd, grpcio, futures

Running off of Docker Ubuntu:latest

Dockerfile to build

$ cat Dockerfile 
ARG http_proxy

FROM ubuntu:latest

WORKDIR "/tmp"

# Install Java.
RUN apt-get update && apt-get install -q -y \
  build-essential \
  openjdk-8-jdk \
  apt-transport-https \
  gnupg2 \
  ca-certificates \
  python2.7 \
  python-pip \
  curl \
  wget \
  vim

ADD ["gauge.pgp", "/tmp/gauge.pgp"]

# Install gauge
RUN apt-key add /tmp/gauge.pgp
RUN echo deb http://dl.bintray.com/gauge/gauge-deb stable main | tee -a /etc/apt/sources.list

RUN apt-get update && \
    apt-get install gauge && \
    wget -e use_proxy=yes -e http_proxy=${http_proxy} -e https_proxy=${https_proxy} --no-check-certificate \
         https://github.com/getgauge/gauge-python/releases/download/v0.3.5/gauge-python-0.3.5.zip && \
    gauge install python -f gauge-python-0.3.5.zip && \
    wget -e use_proxy=yes -e http_proxy=${http_proxy} -e https_proxy=${https_proxy} --no-check-certificate \
         https://github.com/getgauge/gauge-java/releases/download/v0.7.2/gauge-java-0.7.2-linux.x86_64.zip && \
    gauge install java -f gauge-java-0.7.2-linux.x86_64.zip && \
    gauge telemetry off && \
    pip install getgauge  --trusted-host pypi.python.org --trusted-host pypi.org --proxy $http_proxy 

ENV PATH=$HOME/.gauge:$PATH
@BugDiver
Copy link
Member

@bszeliga I was able to replicate this issue at my end. We will be pushing a fix very soon.

Steps to replicate

  • Run gauge install python
  • Run pip/pip3 install getgauge
  • Turn off Internet
  • Run gauge init python if using pip and python
  • Run GAUGE_PYTHON_COMMAND=PYTHON3 gauge init python if using pip3 and python3

@BugDiver BugDiver self-assigned this May 27, 2019
BugDiver pushed a commit that referenced this issue May 27, 2019
@gaugebot
Copy link

gaugebot bot commented May 27, 2019

The fix should be available in nightly >= 27-5-2019

@Debashis9012
Copy link
Contributor

This issue has been verified and found fixed with the version 0.3.6.nightly-2019-05-28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants