gpt-pilot icon indicating copy to clipboard operation
gpt-pilot copied to clipboard

GPT PILOT exiting with error when trying to replace files

Open fmallaba opened this issue 1 year ago • 0 comments

After creating React Native app using create-react-native-app gpt-pilot tried to replace files and failed with exception:

? Can I execute the command: `create-react-native-app PlaylistTransfer` with Nonems timeout?


CLI OUTPUT:? How would you like to start › - Use arrow-keys. Return to submit.
CLI OUTPUT:❯   Default new app
CLI OUTPUT:    Template from expo/examples: https://github.com/expo/examples
✔ How would you like to start › Default new app
CLI ERROR:- Locating project files.
CLI ERROR:✔ Downloaded and extracted project files.
CLI OUTPUT:
CLI ERROR:- Installing JavaScript dependencies.
CLI OUTPUT:Using Yarn to install packages. You can pass --use-npm to use npm instead.
CLI OUTPUT:
CLI ERROR:✔ Installed JavaScript dependencies.
CLI ERROR:- Installing CocoaPods.
CLI ERROR:✔ Skipped installing CocoaPods because operating system is not on macOS.
CLI OUTPUT:
CLI OUTPUT:✅ Your project is ready!
CLI OUTPUT:
CLI OUTPUT:To run your project, navigate to the directory and run one of the following yarn commands.
CLI OUTPUT:
CLI OUTPUT:- cd PlaylistTransfer
CLI OUTPUT:- yarn android
CLI OUTPUT:- yarn ios # you need to use macOS to build the iOS project - use the Expo app if you need to do iOS development without a Mac
Saving file /PlaylistTransfer/app.json
Saving file /PlaylistTransfer/yarn.lock
Saving file /PlaylistTransfer/index.js
Saving file /PlaylistTransfer/package.json
Saving file /PlaylistTransfer/babel.config.js
Saving file /PlaylistTransfer/.gitignore
Saving file /PlaylistTransfer/metro.config.js
Saving file /PlaylistTransfer/App.js
Saving file /PlaylistTransfer/.gitattributes
Saving file /PlaylistTransfer/android/gradlew
Saving file /PlaylistTransfer/android/settings.gradle
Saving file /PlaylistTransfer/android/gradle.properties
Saving file /PlaylistTransfer/android/build.gradle
Saving file /PlaylistTransfer/android/gradlew.bat
Saving file /PlaylistTransfer/android/.gitignore
Saving file /PlaylistTransfer/android/gradle/wrapper/gradle-wrapper.jar
Saving file /PlaylistTransfer/android/gradle/wrapper/gradle-wrapper.properties
Saving file /PlaylistTransfer/android/app/proguard-rules.pro
Saving file /PlaylistTransfer/android/app/build.gradle
Saving file /PlaylistTransfer/android/app/debug.keystore
Saving file /PlaylistTransfer/android/app/src/release/java/com/playlisttransfer/ReactNativeFlipper.java
Saving file /PlaylistTransfer/android/app/src/main/AndroidManifest.xml
Saving file /PlaylistTransfer/android/app/src/main/java/com/playlisttransfer/MainApplication.java
Saving file /PlaylistTransfer/android/app/src/main/java/com/playlisttransfer/MainActivity.java
Saving file /PlaylistTransfer/android/app/src/main/res/values/styles.xml
Saving file /PlaylistTransfer/android/app/src/main/res/values/strings.xml
Saving file /PlaylistTransfer/android/app/src/main/res/values/colors.xml
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Saving file /PlaylistTransfer/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Saving file /PlaylistTransfer/android/app/src/main/res/drawable/splashscreen_image.png
Saving file /PlaylistTransfer/android/app/src/main/res/drawable/rn_edit_text_material.xml
Saving file /PlaylistTransfer/android/app/src/main/res/drawable/splashscreen.xml
Saving file /PlaylistTransfer/android/app/src/debug/AndroidManifest.xml
Saving file /PlaylistTransfer/android/app/src/debug/java/com/playlisttransfer/ReactNativeFlipper.java
Saving file /PlaylistTransfer/ios/.xcode.env
Saving file /PlaylistTransfer/ios/.gitignore
Saving file /PlaylistTransfer/ios/Podfile.properties.json
Saving file /PlaylistTransfer/ios/Podfile
Saving file /PlaylistTransfer/ios/PlaylistTransfer.xcodeproj/project.pbxproj
Saving file /PlaylistTransfer/ios/PlaylistTransfer.xcodeproj/xcshareddata/xcschemes/PlaylistTransfer.xcscheme
Saving file /PlaylistTransfer/ios/PlaylistTransfer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Saving file /PlaylistTransfer/ios/PlaylistTransfer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Saving file /PlaylistTransfer/ios/PlaylistTransfer/AppDelegate.h
Saving file /PlaylistTransfer/ios/PlaylistTransfer/AppDelegate.mm
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Info.plist
Saving file /PlaylistTransfer/ios/PlaylistTransfer/main.m
Saving file /PlaylistTransfer/ios/PlaylistTransfer/SplashScreen.storyboard
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Supporting/Expo.plist
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/Contents.json
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/AppIcon.appiconset/Contents.json
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/SplashScreen.imageset/Contents.json
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/SplashScreen.imageset/splashscreen.png
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/SplashScreenBackground.imageset/background.png
Saving file /PlaylistTransfer/ios/PlaylistTransfer/Images.xcassets/SplashScreenBackground.imageset/Contents.json

Dev step 6

DONE

---------- GPT PILOT EXITING WITH ERROR ----------
Traceback (most recent call last):
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/main.py", line 90, in <module>
    project.start()
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/Project.py", line 134, in start
    self.developer.start_coding()
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/agents/Developer.py", line 40, in start_coding
    self.implement_task(i, dev_task)
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/agents/Developer.py", line 68, in implement_task
    return self.execute_task(convo_dev_task, task_steps, development_task=development_task, continue_development=True, is_root_task=True)
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/agents/Developer.py", line 230, in execute_task
    convo.load_branch(function_uuid)
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/AgentConvo.py", line 153, in load_branch
    self.replace_files()
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/AgentConvo.py", line 160, in replace_files
    self.replace_file_content(msg['content'], file['path'], file['content'])
  File "/home/fmallabaiev-ua/Desktop/gpt-pilot/pilot/helpers/AgentConvo.py", line 169, in replace_file_content
    updated_message, num_replacements = re.subn(pattern, new_section_content, message, flags=re.DOTALL)
  File "/usr/lib/python3.9/re.py", line 221, in subn
    return _compile(pattern, flags).subn(repl, string, count)
  File "/usr/lib/python3.9/re.py", line 327, in _subx
    template = _compile_repl(template, pattern)
  File "/usr/lib/python3.9/re.py", line 318, in _compile_repl
    return sre_parse.parse_template(repl, pattern)
  File "/usr/lib/python3.9/sre_parse.py", line 997, in parse_template
    raise s.error("missing <")
re.error: missing < at position 2165 (line 72, column 27)
--------------------------------------------------

Please note that I've set timeout to None because the timeouts provided by GPT aren't enough to install/setup nodejs projects.

When I try to start from previous step it hits the same error again.

fmallaba avatar Oct 06 '23 13:10 fmallaba