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

Unable to run python project #156

Closed
Debashis9012 opened this issue Aug 22, 2019 · 2 comments
Closed

Unable to run python project #156

Debashis9012 opened this issue Aug 22, 2019 · 2 comments
Assignees
Labels

Comments

@Debashis9012
Copy link
Contributor

Excepted Result:

should be able to run python project successfully.

Actual Result:

unable to run specs. Getting below error:

Traceback (most recent call last):
File "check_and_install_getgauge.py", line 49, in <module>
assert_versions()
File "check_and_install_getgauge.py", line 30, in assert_versions
python_plugin_version = get_version()
File "check_and_install_getgauge.py", line 9, in get_version
data = json.loads(str(out.decode()))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
File "start.py", line 9, in <module>
from getgauge import connection, logger, lsp_server, processor
ImportError: cannot import name logger
Error ----------------------------------

[Gauge]
Failed to start gauge API: Runner with pid 35656 quit unexpectedly(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 -----------
	darwin, 1.0.6.nightly-2019-08-01, 2bc49db
	csharp (0.10.6), dotnet (0.1.2), html-report (4.0.8), java (0.7.3), js (2.3.6), python (0.3.6), ruby (0.5.3), screenshot (0.0.1), xml-report (0.2.1)

Steps to reproduce

  1. create a python project gauge init python
  2. run spces either from terminal or from vs-code gauge run

Information that will help us debug

tested version:

Gauge version: 1.0.6.nightly-2019-08-01
Commit Hash: 2bc49db

Plugins
-------
python (0.3.6.nightly-2019-07-25)
@BugDiver
Copy link
Member

BugDiver commented Aug 22, 2019

The actual issue here is in check_and_install.py

Traceback (most recent call last):
File "check_and_install_getgauge.py", line 49, in <module>
assert_versions()
File "check_and_install_getgauge.py", line 30, in assert_versions
python_plugin_version = get_version()
File "check_and_install_getgauge.py", line 9, in get_version
data = json.loads(str(out.decode()))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")

Since it fails and does not install the pip package, the start.py could not get the logger module.

The start.sh script does not handle the error, and even tough check_and_install.py fails it tries to execute start.py, which it should not.

These are the fixes which need to be done

  • Set error trap in starter scripts
  • Fix the JSON decoding issue.

@Debashis9012
Copy link
Contributor Author

This issue has been verified and found fixed.
Tested version:

Gauge version: 1.0.6.nightly-2019-08-26
Commit Hash: 756d578
python (0.3.6.nightly-2019-08-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

2 participants