I was facing the same issue. The error I got was as follows:
IOError: [Errno 2] No such file or directory c:\\users\\...\\appdata\\local\\temp \\d36348_state.mallet.gz.
Each time I tried to run the code the prefix before the underscore would change but the error name would always end with the form "~Some Alphanumeric String~_state.mallet.gz".
I tried to understand the stack trace output in the console. The line just before this error line was as follows:
fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
I googled it and found this particular link. It is a github link where a person raised a different error, but the ending part of his error log was the same as mine. The solution to his error was an upgrade of his smart_open
module, which gensim
depends on, as the upgrade had fixed the issue. So i checked my smart_open
module version and it was 1.4.x
, last updated about a year and a half ago, so I upgraded it to the version 1.5.7
and the LdaMallet code works without a hiccup.
Please check if the problem on your end is being caused because of the same reasons.
Hope it helps!
P.S. I also updated my gensim
module alongside the smart_open
to version 3.4.