Pythagora-io / gpt-pilot

The first real AI developer
Other
29.09k stars 2.91k forks source link

[Bug]: Pilot creates a dir, which existance make it crash #905

Open chymian opened 2 months ago

chymian commented 2 months ago

Version

Command-line (Python) version

Operating System

Linux (other)

What happened?

CLI noob installation. trying to create a ansible playbook. it creates a folder ansible and in step 31 crashes, because the folder exists.

deleting the folder, making it a file, etc doesn't change anyting.

Dev step 31                                                                                                                                         

{"hunks": [{"number": 1, "reason": "The hunk accurately delivers the intended functionality of setting up k3s as the Kubernetes distribution for run
ning AI/GPU-intensive workloads.", "decision": "apply"}], "review_notes": ""}                                                                       

Applying entire change                                                    
Review finished. Continuing...                                            

---------- GPT PILOT EXITING WITH ERROR ----------                        
Traceback (most recent call last):                                        
  File "/home/paia/gpt-pilot/pilot/main.py", line 126, in <module>                                                                                  
    started = project.start()                                             
              ^^^^^^^^^^^^^^^                                             
  File "/home/paia/gpt-pilot/pilot/helpers/Project.py", line 229, in start                                                                          
    self.developer.start_coding('app')                                                                                                              
  File "/home/paia/gpt-pilot/pilot/helpers/agents/Developer.py", line 109, in start_coding                                                          
    task_executed = self.implement_task(i, task_source, dev_task)                                                                                   
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                   
  File "/home/paia/gpt-pilot/pilot/helpers/agents/Developer.py", line 253, in implement_task                                                        
    result = self.execute_task(convo_dev_task,                            
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                            
  File "/home/paia/gpt-pilot/pilot/helpers/agents/Developer.py", line 650, in execute_task                                                          
    result = self.step_save_file(convo, step, i, test_after_code_changes)                                                                           
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                           
  File "/home/paia/gpt-pilot/pilot/helpers/agents/Developer.py", line 365, in step_save_file                                                        
    code_monkey.implement_code_changes(convo, data)                       
  File "/home/paia/gpt-pilot/pilot/helpers/agents/CodeMonkey.py", line 133, in implement_code_changes                                               
    self.project.save_file({         
  File "/home/paia/gpt-pilot/pilot/helpers/Project.py", line 450, in save_file                                                                      
    update_file(full_path, data['content'], project=self)                 
  File "/home/paia/gpt-pilot/pilot/helpers/files.py", line 21, in update_file                                                                       
    os.makedirs(os.path.dirname(path), exist_ok=True)                     
  File "<frozen os>", line 225, in makedirs                               
FileExistsError: [Errno 17] File exists: '/home/paia/gpt-pilot/workspace/AIRE/ansible'                                                              
--------------------------------------------------
techjeylabs commented 1 month ago

hey there, sorry for my late reply. Is there a chance to talk to you in discord? so we could exchange some more context data. Also it would be super usefull if you could upload your Database, you can do this from within your Pythagora Settings page.

chymian commented 1 month ago

hey there, sorry for my late reply. Is there a chance to talk to you in discord? so we could exchange some more context data.

As I discussed on discord (with you/jermey?) and meantioned in ticket 911.

IMHO, no, we can't. bringing the discussion & context of a bug/solution-process – which has to be handled in ONE place – to a different platform is not helpful. one would split the info… how would one research? hopping between here and discord and try to find the info there? good luck.

and as I can see, or better cannot see, there is no access to the closed tickets on discord…

IMHO, discord is a chat-tool. trying to make it a devops-tool will uttlery fail. and much worse, the project will not have ONE SOURCE of TRUTH. where to lookup? on discord - I won't - its a waste of time. sry, but out of my 35+ years of experience as a sysadmin, my humble and best advice is: stay with a devops tool for your error/bug/release mgmt.

Also it would be super usefull if you could upload your Database, you can do this from within your Pythagora Settings page.

sure, will do in the coming days