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

Can't parse chat files with LF endings #52

Open
staveyal opened this issue Nov 6, 2020 · 1 comment · May be fixed by #66
Open

Can't parse chat files with LF endings #52

staveyal opened this issue Nov 6, 2020 · 1 comment · May be fixed by #66
Assignees
Labels
backend related to backend code bug Something isn't working
Projects

Comments

@staveyal
Copy link
Collaborator

staveyal commented Nov 6, 2020

Issue:

When uploading a file with LF line endings (\n), the code fails to parse the files correctly, and removes a character from the end of each meassage.

Cause:

In server/server/parsing/utils.py, we removed a single character from the end of the line (to compensate for Windows line endings).

def create_chat_def(chat_file):
# ...
chat_df['message'] = chat_df['message'].str[:-1].astype(str)  # remove end of line (could be "/n" or "/t")
#...

Suggested solution

We should implement a fix that detects if the file uses CRLF or LF line endings, and splits by the corresponding character.

@staveyal staveyal added backend related to backend code bug Something isn't working labels Nov 6, 2020
@InbarShirizly InbarShirizly added this to To do in Server-app via automation Nov 6, 2020
@InbarShirizly InbarShirizly moved this from To do to In progress in Server-app Nov 6, 2020
InbarShirizly added a commit that referenced this issue Nov 16, 2020
this commit is not the changed that solved the problem - only cleaning the code
@jonohayon jonohayon assigned jonohayon and unassigned InbarShirizly Feb 8, 2021
@jonohayon jonohayon linked a pull request Feb 8, 2021 that will close this issue
@jonohayon
Copy link
Collaborator

jonohayon commented Feb 8, 2021

Fixed in #66, still awaiting review by @InbarShirizly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend related to backend code bug Something isn't working
Projects
Server-app
In progress
Development

Successfully merging a pull request may close this issue.

3 participants