Comments (5)
I'm still facing this error. Is there an update on how to fix it?
from whatstk.
hi @JoshEe00,
I'll try to address this bug these days. Can you share a slice of your chat so it helps me debug (feel free to replace the message content for whatever)?
from whatstk.
Could you, @JoshEe00 or @pumalife, share a demo text exported from your chat as a TXT file? Could you replace its messages if needed? Also, please share the code you tried to read and the error that you got. Otherwise it is hard for me to debug this bug.
I copied the chat content from @pumalife into a txt file, and then running
from whatstk import df_from_txt_whatsapp
df = df_from_txt_whatsapp("chat-139.txt", hformat="[%m/%d/%y, %H:%M:%S] %name:")
And it seems to work fine. Could you please confirm again that this is not working for you (and what error are you having)?
Incidentally, if I open the TXT file with the chat, I can read some characters I am not familiar with.
from whatstk.
Here's the text I used. I had to manually configure to hformat to get it to work.
For my case, the chat was exported on Android.
from whatstk.
Hi @JoshEe00,
The automatic header is not working for you because of line 3, where you have the following:
04/03/2024, 22:29 - +1-374-8523 added you to a group in the community: Community 1
This is wrongly interpreted as a user message and breaks the processing. Current workarounds would be to:
- Define the format manually:
df = df_from_whatsapp("WhatsappTestChat.txt", hformat="%d/%m/%y, %H:%M - %name:")
- Remove line 3 from the TXT file.
This file might be exported from a community (not a group), showing different exported chat structures.
I will close this issue for now and have written up an issue that follows up on this: #147. Once this issue is fixed, the library should work out of the box for you.
Thanks for reporting!
from whatstk.
Related Issues (20)
- Python 3.9 compatibility HOT 2
- change index in chat dataframe: Use ID instead of timestamp (since timestamp might be repeated)
- Reduce library dependencies so that whatstk becomes lighter
- Installation error with Python 3.8 and Visual Studio HOT 11
- Fix links
- Automate chat text files to CSV conversion HOT 6
- ENH: Add support for Google Drive
- Error when using `pip install` HOT 8
- Parse messages which contain \n characters HOT 1
- Migrate CI/CD: Travis to GitHub Actions HOT 1
- Chat Parser Not Working HOT 4
- Not parsing correctly when time is in am/pm HOT 4
- Package dependencies HOT 3
- "None of [Index(['date', 'username', 'message'], dtype='object')] are in the [columns]" HOT 2
- Documentation fixes
- v0.7.0: new features, and fixes
- fix: correctly filter system messages HOT 2
- Figure Builder Error
- time - 12 hour clock HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatstk.