JingJingJingJing / Sira

This is sira
2 stars 1 forks source link

Query Jira - Issues - With JQL #90

Open kiddliu opened 5 years ago

kiddliu commented 5 years ago

As a user, I want to query Jira issues with JQL (mode=jql).

The default item for an issue is, with ordering

If the count of the result is more than 1, output each issue on a new line. For example:

> sira --query type=jql query="assignee=currentUser()"
Defect TEST-1234 "Cannot access Github via Wi-Fi"
kiddliu commented 5 years ago
C:\Users\ziok_>where sira
C:\Users\ziok_\Desktop\source\Sira\build\sira\sira.exe

C:\Users\ziok_>sira --query type=jql query="assignee=currentUser()"
Traceback (most recent call last):
  File "siraquery.py", line 224, in <module>
  File "siraquery.py", line 217, in main
  File "utils.py", line 255, in print_err
ModuleNotFoundError: No module named 'colorama'
[13112] Failed to execute script siraquery

I follow the instruction on the readme, and this is the result I got

JingJingJingJing commented 5 years ago

@kiddliu Have you installed termcolor using pip? If no, please try typing "pip install termcolor" to install it. If yes, it may be that I have installed 'colorama' by default and I don't know. You can just type "pip install colorama" to install 'colorama‘ and the problem will be solved.

kiddliu commented 5 years ago
C:\Users\ziok_>pip install colorama
Collecting colorama
  Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Installing collected packages: colorama
Successfully installed colorama-0.3.9
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\ziok_>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 4.7MB/s
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0

C:\Users\ziok_>pip install colorama
Requirement already satisfied: colorama in c:\python37\lib\site-packages (0.3.9)

C:\Users\ziok_>sira --query type=jql query="assignee=currentUser()"
Traceback (most recent call last):
  File "siraquery.py", line 224, in <module>
  File "siraquery.py", line 217, in main
  File "utils.py", line 255, in print_err
ModuleNotFoundError: No module named 'colorama'
[9104] Failed to execute script siraquery

Pretty interesting

JingJingJingJing commented 5 years ago

@kiddliu I guess I have known what the problem is. Lucas have encountered a similiar problem before. This error is caused by PyInstaller. PyInstaller did not package colorama to exe during the conversion. I have modified the files 'build/sira.spec' and 'build/sira-query.spec' to fix this problem. Now you can pull down the new files and run 'build/build.sh' again and then it will run successfully (hopefully...).