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

cant run rawdog on windows. #67

Closed
thelege2nd opened this issue Feb 15, 2024 · 9 comments
Closed

cant run rawdog on windows. #67

thelege2nd opened this issue Feb 15, 2024 · 9 comments

Comments

@thelege2nd
Copy link

I am using Python 3.12.2

I ran pip install rawdog-ai

then I initially get this error when I run rawdog

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\rawdog_main
.py", line 4, in
import readline
ModuleNotFoundError: No module named 'readline'

I installed pip install pyreadline

Now I'm getting this error

C:\Windows\System32>rawdog
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Scripts\rawdog.exe_main
.py", line 4, in
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\rawdog_main
.py", line 4, in
import readline
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\readline.py", line 34, in
rl = Readline()
^^^^^^^^^^
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\rlmain.py", line 422, in init
BaseReadline.init(self)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\rlmain.py", line 62, in init
mode.init_editing_mode(None)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\modes\emacs.py", line 633, in init_editing_mode
self._bind_key('space', self.self_insert)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\modes\basemode.py", line 162, in _bind_key
if not callable(func):
^^^^^^^^^^^^^^
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
return isinstance(x, collections.Callable)
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Callable'

@biobootloader
Copy link
Member

try pip install pyreadline3 instead - sorry this should be fixed already on the github version of the code, but hasn't yet been updated on PyPI

@biobootloader
Copy link
Member

it's updated on PyPI now! closing this as it should be fixed, please reopen if you experience any more issues.

@thelege2nd
Copy link
Author

rawdog failed to start for some reason.**

C:\Users\thele>rawdog
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Scripts\rawdog.exe_main
.py", line 7, in
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog_main
.py", line 88, in main
llm_client = LLMClient(config)
^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\llm_client.py", line 36, in init
{"role": "system", "content": EnvInfo(config=self.config).render_prompt()},
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 21, in init
self._set_from_env()
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 38, in _set_from_env
self.cwd_info = self._get_cwd_info()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 63, in _get_cwd_info
size = len(list(item.iterdir())) if item.is_dir() else item.stat().st_size
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 931, in iterdir
for name in os.listdir(self):
^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied: 'C:\Users\thele\Application Data'

So I ran CMD with admin privilege. It worked but it's showing that fatal error. is this normal? Should I still pip install pyreadline3??

image

@miraculix95
Copy link

I have had the same issue. I had exactly the same error as the other guy, .... tried to manually import readline ... the same problem ... tried to import pyreadline ... again ... luckily I have seen this closed message ... so I imported the pyreadline3. And finally. The Windows installation is a pain, and after all these troubles - it cost me a significant amount of time - I am now rather cautious about the product. ... but thanks anyway ...

@biobootloader
Copy link
Member

@miraculix95 how did you install rawdog? with pip install rawdog-ai or by cloning this repo?

@miraculix95
Copy link

With pip install rawdog-ai

@miraculix95
Copy link

One information I found missing as well: What Python versions are allowed? Is Python 3.12. allowed?
What is the ~ directory for the config file in the context of a windows installation?

@biobootloader
Copy link
Member

Ah, thanks there was an issue with requirements setup, fixed by @jakethekoenig here: #88

Python 3.12 should work! We'll add which versions work, but I'd assume 3.10+

The ~ directory on windows should be something like C:\Users\username

@miraculix95
Copy link

Thanks a lot

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

No branches or pull requests

3 participants