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

Fixing TypeError in file_selector.py #756

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

Ruijian-Zha
Copy link
Contributor

In the gpt-engineer project, a TypeError was encountered in file_selector.py when attempting to join WindowsPath objects directly. The error occurred as the code expected a string instance but received a WindowsPath instance instead. To rectify this, the line of code was updated to convert WindowsPath objects to strings before joining. This change resolves the TypeError while maintaining the original functionality of the code, ensuring that the program can handle file paths correctly across different operating systems.

Ruijian-Zha and others added 3 commits October 2, 2023 20:36
Updated file_selector.py to handle WindowsPath objects by converting them to strings before joining. This resolves the TypeError encountered when trying to join WindowsPath objects directly.
Fix TypeError in file_selector.py
In the gpt-engineer project, a TypeError was encountered in file_selector.py when attempting to join WindowsPath objects directly. The error occurred as the code expected a string instance, but received a WindowsPath instance instead. To rectify this, the line of code was updated to convert WindowsPath objects to strings before joining. This change resolves the TypeError while maintaining the original functionality of the code, ensuring that the program can handle file paths correctly across different operating systems.
@ATheorell ATheorell merged commit c5ac0fc into gpt-engineer-org:main Oct 4, 2023
5 checks passed
@ATheorell
Copy link
Collaborator

@Ruijian-Zha did you use the gui or cli selector? Both the functions

def gui_file_selector(input_path: str) -> List[str]:

def terminal_file_selector(input_path: str) -> List[str]:

promise to return a string, which they didn't do in your case. It would be better if we solve the problem inside these functions so that they have the right return type.

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 this pull request may close these issues.

None yet

2 participants