smol-ai / developer

the first library to let you embed a developer agent in your own app!
https://twitter.com/SmolModels
MIT License
11.79k stars 1.03k forks source link

PermissionError: [Errno 13] Permission denied #79

Open Idontplaytheguitar opened 1 year ago

Idontplaytheguitar commented 1 year ago

image

Getting this every time on any prompt :( can't make it work

fpartous commented 1 year ago

Same. I tried ~/smol-developer$ chmod a+w generated to give full access to the /generated directory but it didn't work

d3287t328 commented 1 year ago

you gotta give the full error message dudes.

Niutonian commented 1 year ago

I hope it's not too bad for me to piggyback on this thread, but I have a similar error when trying to generate an arduino script, it starts working then I get this crash

ecord_audio_handle.start()
╭────────────────────────── Traceback (most recent call last) ──────────────────────────╮ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\runpy.py:196 in │ │ _run_module_as_main │ │ │ │ 195 │ │ sys.argv[0] = mod_spec.origin │ │ ❱ 196 │ return _run_code(code, main_globals, None, │ │ 197 │ │ │ │ │ "main", mod_spec) │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\runpy.py:86 in _run_code │ │ │ │ 85 │ │ │ │ │ spec = mod_spec) │ │ ❱ 86 │ exec(code, run_globals) │ │ 87 │ return run_globals │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\Scripts\modal.exe__main.py: │ │ 7 in │ │ │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\modal__main │ │ __.py:6 in main │ │ │ │ 5 def main(): │ │ ❱ 6 │ entrypoint_cli() │ │ 7 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.p │ │ y:1130 in call__ │ │ │ │ 1129 │ │ """Alias for :meth:main.""" │ │ ❱ 1130 │ │ return self.main(*args, kwargs) │ │ 1131 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\typer\core.p │ │ y:778 in main │ │ │ │ 777 │ ) -> Any: │ │ ❱ 778 │ │ return _main( │ │ 779 │ │ │ self, │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\typer\core.p │ │ y:216 in _main │ │ │ │ 215 │ │ │ with self.make_context(prog_name, args, extra) as ctx: │ │ ❱ 216 │ │ │ │ rv = self.invoke(ctx) │ │ 217 │ │ │ │ if not standalone_mode: │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.p │ │ y:1657 in invoke │ │ │ │ 1656 │ │ │ │ with sub_ctx: │ │ ❱ 1657 │ │ │ │ │ return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ 1658 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.p │ │ y:1657 in invoke │ │ │ │ 1656 │ │ │ │ with sub_ctx: │ │ ❱ 1657 │ │ │ │ │ return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ 1658 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.p │ │ y:1404 in invoke │ │ │ │ 1403 │ │ if self.callback is not None: │ │ ❱ 1404 │ │ │ return ctx.invoke(self.callback, ctx.params) │ │ 1405 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.p │ │ y:760 in invoke │ │ │ │ 759 │ │ │ with ctx: │ │ ❱ 760 │ │ │ │ return __callback(*args, *kwargs) │ │ 761 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\click\decora │ │ tors.py:26 in new_func │ │ │ │ 25 │ def new_func(args, kwargs): # type: ignore │ │ ❱ 26 │ │ return f(get_current_context(), *args, *kwargs) │ │ 27 │ │ │ │ C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\site-packages\modal\cli\ru │ │ n.py:116 in f │ │ │ │ 115 │ │ │ else: │ │ ❱ 116 │ │ │ │ func(args, **kwargs) │ │ 117 │ │ │ if app.function_invocations == 0: │ │ │ │ C:\Users\Admin\AI\Smol\developer\main.py:171 in main │ │ │ │ 170 │ │ │ ): │ │ ❱ 171 │ │ │ │ write_file(filename, filecode, directory) │ │ 172 │ │ │ │ C:\Users\Admin\AI\Smol\developer\main.py:194 in write_file │ │ │ │ 193 │ # Open the file in write mode │ │ ❱ 194 │ with open(file_path, "w") as file: │ │ 195 │ │ # Write content to the file │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ PermissionError: [Errno 13] Permission denied: '/main.py'

It does work on simpler arduino prompts though