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

TypeError: write() argument must be str, not bytes #14

Open
VDK opened this issue Nov 7, 2023 · 0 comments
Open

TypeError: write() argument must be str, not bytes #14

VDK opened this issue Nov 7, 2023 · 0 comments

Comments

@VDK
Copy link

VDK commented Nov 7, 2023

I'm trying out this app and quickly get this TypeError:

Traceback (most recent call last): File "C:\Users\Vera\Downloads\keyword\keywords_tfidf.py", line 90, in <module> corpus, dictionary = cp.MyCorpus(doc_folder, stop_folder, str(doc_length)).load() File "C:\Users\Vera\Downloads\keyword\corpus.py", line 99, in __init__ self.doc_list = get_documents(doc_dir, doc_length) File "C:\Users\Vera\Downloads\keyword\corpus.py", line 31, in get_documents print('Processing documents ...') File "C:\Users\Vera\AppData\Local\Programs\Python\Python310\lib\codecs.py", line 378, in write self.stream.write(data) TypeError: write() argument must be str, not bytes

I put a collection of txt-files in the "documents" folder but I don't have stopwords. How do stopwords need to be formatted?
I'm using python 3.10.0 on a Windows PC.

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

No branches or pull requests

1 participant