Clone the repository using git clone https://github.com/opensouls/terminal-copilot.git
cd terminal-copilot
python3 -m venv .venv is used to create a new environment.
Activate the environment using source .venv/bin/activate.
Install the requirements using pip install -r requirements.txt.
python3 setup.py install
face an error when running copilot:
Traceback (most recent call last):
File "/home/deftera/terminal-copilot/.venv/bin/copilot", line 33, in <module>
sys.exit(load_entry_point('terminal-copilot==1.2.2', 'console_scripts', 'copilot')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deftera/terminal-copilot/.venv/bin/copilot", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 936, in exec_module
File "<frozen importlib._bootstrap_external>", line 1074, in get_code
File "<frozen importlib._bootstrap_external>", line 1004, in source_to_code
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/deftera/terminal-copilot/.venv/lib/python3.11/site-packages/terminal_copilot-1.2.2-py3.11.egg/copilot/main.py", line 246
"""
^
SyntaxError: unterminated triple-quoted string literal (detected at line 252)
Details about my environment:
Python 3.11.3
Pip 22.3.1
OS: Arch Linux x86_64
Shell: zsh 5.9
A possible fix for the Issue (which needs discussion):
The problem seems to be when we are adding prompt += """. Which can be proven, by removing the line, and fixing the problem. The thing is, I don't know what was actually intended (it could be adding a quote, which can be solved by escaping it, or surround it using single quotes if what was intended was to add triple quotes).
Steps to reproduce:
git clone https://github.com/opensouls/terminal-copilot.git
cd terminal-copilot
python3 -m venv .venv
is used to create a new environment.source .venv/bin/activate
.pip install -r requirements.txt
.python3 setup.py install
copilot
:Details about my environment:
A possible fix for the Issue (which needs discussion):
The problem seems to be when we are adding
prompt += """
. Which can be proven, by removing the line, and fixing the problem. The thing is, I don't know what was actually intended (it could be adding a quote, which can be solved by escaping it, or surround it using single quotes if what was intended was to add triple quotes).https://github.com/opensouls/terminal-copilot/blob/2bca75d526a4ed2712a803a479241c77db7e5d9a/copilot/main.py#LL83C1-L89C47