Mallet with Gensim: file-not-found - gensim

I try to get LDAMallet in gensim working, but get the following error
'C:\...\AppData\Local\Temp\eb09f5_state.mallet.gz' not found
The code
ldamallet = gensim.models.\
wrappers.LdaMallet(mallet_path,
corpus=corpus,
num_topics=5,
id2word=dictionary)
(the num_topics is extremely small, but the test goes over 5 sentences; this has no problem in the regular gensim LdaModel)
thanks,

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.

Related

Joomla 3.10 won't work after they upgraded MariaDB on the server - Errors loading module Table 'joom_modules_menu' doesn't exist; field_values error

Yesterday my site suddenly stopped working and after investigating I found out that Midphase upgraded the PHP to 8.1 and MariaDB (says from 10.3 to 10.5). I got them to roll back PHP to 7.4 for the time being, although it sounds like it was already on 7.4, which is good as they couldn't go back further.
My live site is on 3.10.1 (http://www.scifivision.com) and after running an upgrade on a backup, assuming I did it right I have a version on 3.10.11. (http://www.thejfiles.com/sfv2023). Both are giving me the same errors other than the database name is different.
The frontend gives me white page with the error "1146 - Table 'thejrub4_joomfin.joom_fields_values' doesn't exist" and backend gives me a warning "Error loading module Table 'thejrub4_joomfin.joom_modules_menu' doesn't exist" and it lets me log in but I can't do anything.
Just wanted to mention, in case it's relevant, I have an earlier backup (I'm at the point if anything is fixed I'll be happy) that is also giving me two warnings:
session_name(): Session name cannot be changed after headers have already been sent in /home/thejrub4/public_html/sfvclon/libraries/joomla/session/handler/native.php on line 128
ession_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /home/thejrub4/public_html/sfvclon/libraries/joomla/session/handler/native.php on line 235
Error: Failed to start application: Failed to start the session because headers have already been sent by "/home/thejrub4/public_html/sfvclon/libraries/vendor/joomla/input/src/Input.php" at line 41.
Since I am not seeing them on the newer backup, I'm assuming that is probably not the issue and was something I previously fixed, as I do have maximum on for debug
I have used forum post assistance for joomla.org if that helps and I will post the code below. This is for the 3.10.11 install, as the FPA wouldn't work on the older one. It says it should work without any issues, but clearly that's not true. I didn't know if that would help on this forum, but if you need it please let me know.

Call to undefined method DateTime::getTimezone()

For some reason most of my pages are giving this error "Call to undefined method DateTime::getTimezone()". I'm kind of positive that the pages that have this error got a ->created_at->diffForHumans() function. I still have no idea whats causing this.. It has been working fine since forever.
I tried updating my packages but there was no luck there.. Searched around for the function itself or inside my controllers.. also no luck. Checked my time zone in config/app.php and it had the same time zone that I've always had which is Asia/Amman
Check this discussion please:
https://github.com/laravel/framework/issues/24886
As it say there:
This issue is closed as it is not an issue with Laravel; it was an
issue with the PHP docs at the time, which have since been updated. I
would suggest you review your own code and make sure it's not a
namespace problem (i.e. use new \DateTime instead of new DateTime) and
if you still can't figure it out, post a question on StackOverflow
with the minimum amount of code needed to reproduce the error.
Edit:
Since this was after a Composer update, I would guess that the problem
lies with one of the packages that were updated. The error message
should give you the exact line number producing the error, which
should help you determine what package is causing the error. Then file
a bug report (or pull request) against that package if possible.
I hope it helps.
I kept changing the php version and it eventually worked. It was 7.1.22 and I changed it to 7.2.* and it worked just fine...

Processing 3: NullPointerException using PTreeMappa

I'm using Processing 3 for generating a Treemap.I installed gicentreUtils and placed TreeMappa file in the library folder of Processing. I'm getting nullPointerException in line:
pTreeMappa = new PTreeMappa(this).
The full code can be found in this
link
Can someone please let me know how to resolve this error.
Thanks
It seems the TreeMapa library hasn't been updated in a few years and internally it may use some Processing code that changed from version 2.x to 3.x (like windows/frames/etc.) which is why the error might occur.
I advise using TreeMapa with Processing 2.2.1 available on the Processing Downloads page

BreezeJS's 1.4.1 isolateES5Props causing Out of Stack Space error in IE 8

Using 1.4.1 of BreezeJS we found that some new code added to Isolate ES5 Properties is causing IE 8 to have the following error:
Error getting metadata: Metadata import failed for breeze/breeze/Metadata; Unable to process returned metadata:Object doesn't support property or method 'getPrototypeOf'
We tried using both Uber Proto's getPrototypeOf (https://github.com/daffl/uberproto) and es5-sham (https://github.com/kriskowal/es5-shim) but both result with the same issue.
We also tried removing the regular json.parse and using json2's version with the same results.
Metadata import failed for /breeze/breeze/Metadata; Unable to process returned metadata:Out of stack space
Chrome, Firefox, and IE 9+ work without issue, but IE 8 support is required. We can comment out the line to get it to work:
// isolateES5Props(proto);
But I'm guessing that will cause issues somewhere down the line.
This should be fixed in Breeze v 1.4.2, available now.

Magento export to CSV File shows "Error 503"

Good morning.
I've been having this issue for some days and have been lokking for a solution, but I haven't found one yet.
The problem is, I have this Magento store and some grids can be exported to CSV files, while others shows:
Error 503 Service Unavailable
Service Unavailable
Guru Meditation:
XID: 853411302
Varnish cache server
The Magento version I'm using is 1.6.2. I guess the problem is not about PHP code, since the error shown is this generic error, instead of a PHP one (I even found the code used for exporting files and it seems to be ok).
I would like to know why is this error being showed to me.
This is a Varnish Cache related error, I would suggest following the guide below on how to identify what the XID is returning for more insight on how to fix the issue:
https://www.varnish-cache.org/docs/trunk/tutorial/troubleshooting.html#varnish-gives-me-guru-meditation

Resources