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

Apparently failed to create subfolder in workspace/ #85

Closed
noobAIcoder opened this issue Jun 16, 2023 · 1 comment · Fixed by #89
Closed

Apparently failed to create subfolder in workspace/ #85

noobAIcoder opened this issue Jun 16, 2023 · 1 comment · Fixed by #89

Comments

@noobAIcoder
Copy link

│   15 │   │   │   return f.read()                                                                 │
│   16 │                                                                                           │
│   17 │   def __setitem__(self, key, val):                                                        │
│ > 18 │   │   with open(self.path / key, 'w', encoding='utf-8') as f:                             │
│   19 │   │   │   f.write(val)                                                                    │
│   20 │                                                                                           │
│   21 │   def __contains__(self, key):                                                            │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │  key = 'components/SelectionComponent.js'                                               │ │
│ │ self = <gpt_engineer.db.DB object at 0x000001DB9B177650>                                     │ │
│ │  val = "import React, { useState } from 'react';\n\nfunction SelectionComponent() {\n   │ │
│ │        "+315                                                                                 │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Work\\Repos\\gpt-engineer\\new-project\\workspace\\components\\SelectionComponent.js'
@AntonOsika
Copy link
Owner

Should fix this by adding os.makedirs(folder_path, exists_ok=True) 🙏

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

Successfully merging a pull request may close this issue.

2 participants