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

Python Interpreter Failing to Parse fstring with newline character in expression. #59

Open
2 tasks done
Luceium opened this issue Sep 17, 2024 · 0 comments
Open
2 tasks done
Assignees
Labels
c-bug Category: Something isn't working

Comments

@Luceium
Copy link

Luceium commented Sep 17, 2024

Prerequisites

  • I checked the documentation and found no answer to my problem
  • I checked the existing issues and made sure there are no similar bug reports

Category

Bug in Agentverse

Expected Behavior

When running the following line of code:
rsp = f"{msg.username} has contributed {len(repos)} external repositories:\n{"\n".join(repos)}"
it should work as it does in Python.

Observed Behavior

The web IDE on the Agentverse website logs an info-level warning "unexpected character after line continuation character".

The warning went away by breaking down the one-liner into two parts, allowing me to deploy the function.

repoStr = "\n".join(repos)
rsp = f"{msg.username} has contributed {len(repos)} external repositories:\n{repoStr}"
```info-level

### To Reproduce

Run `rsp = f"{msg.username} has contributed {len(repos)} external repositories:\n{"\n".join(repos)}"` on the agentverse editor.

### Environment Details (Optional)

_No response_

### Failure Logs (Optional)

_No response_

### Additional Information (Optional)

_No response_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-bug Category: Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants