DBPedia FactExtractor: fails on extract-pacges - dbpedia

I'm using the fact-extractor (link) to run their example of extracting info from the football wiki pages. I've installed and tested all dependencies on windows and when I execute "make extract-pages", i get the following error:
(dbpenv) C:\dbpedia\fact-extractor-master>make extract-pages
mkdir workspace-en
bzcat enwiki-latest-pages-articles.xml.bz2 | python lib/WikiExtractor.py -o workspace-en/pages
File "lib/WikiExtractor.py", line 598
print id, title.encode('utf-8')
^
SyntaxError: invalid syntax
bzcat: I/O or other error, bailing out. Possible reason follows.
bzcat: Invalid argument
Input file = enwiki-latest-pages-articles.xml.bz2, output file = (stdout)
make: *** [Makefile:39: extract-pages] Error 1
I can't make sense of the error. This is an as-is codebase from their repo so I'm not really sure how to fix this.

Related

Linux:load error:No such file or directory

I am deploying a web server, and after I finish compiling.There are the executing documents;
01client.c client epoll_server.c server
Then I try to run server
./server
There is an error which I cant fix it. I have search ways for solving but still can't fix it.
load error: No such file or directory
Maybe some one can help me,please!
Thanks a lot!!!!
System utilities print the program generating the error at the beginning of the line followed by other useful information such as the name of the missing file, so this is probably an error from a user program. I can duplicate the error as follows:
errno = 2;
perror("load error");
which prints:
load error: No such file or directory
Look for the perror line in the server code. If it isn't clear what file it can't find, print the string from the failed command it is reporting.

Running tsung_stats from tsung and getting Symbol not found: _Perl_xs_handshake error

I am trying to produce an output using tsung_stats, however whenever I run the command:
/usr/local/Cellar/tsung/1.7.0/lib/tsung/bin/tsung_stats.pl --stats /Users/Chris/.tsung/log/20181031-2312/tsung.log
The following happens:
warn, last interval (7) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
No data for Errors
dyld: lazy symbol binding failed: Symbol not found: _Perl_xs_handshake
Referenced from:
/usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0/darwin-thread-multi-2level/auto/Template/Stash/XS/XS.bundle
Expected in: flat namespace
dyld: Symbol not found: _Perl_xs_handshake Referenced from:
/usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0/darwin-thread-multi-2level/auto/Template/Stash/XS/XS.bundle
Expected in: flat namespace
Abort trap: 6
At first it was giving me this error:
warn, last interval (7) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
No data for Errors
Can't locate Template.pm in #INC (you may need to install the Template
module) (#INC contains: /Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.2/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.2
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18 .) at
/usr/local/Cellar/tsung/1.7.0/lib/tsung/bin/tsung_stats.pl line 571.
After searching the internet, I first ran sudo cpan Template and then set the environment variable PERL5LIB to the path of Perl (i.e. /usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0).
I am stuck and there doesn't seem to be a fix on the internet, what can be done next?
I had a similar problem. Instead of sudo cpan Template,
execute the following
sudo perl -MCPAN -e'shell'
then
install Template
and
quit
It works for me

llvm-cov and "unknown command line argument: -format=html"

I did a code coverage test using the llvm utility. After that, I needed to do a html cover file. I used the command
llvm-cov show test -instr-profile=default.profdata -format=html > report.html
Then I received the following error:
Unknown command line argument '-format=html'.
How I can solve my problem ?
According to the documentation the syntax is
llvm-cov show [options] -instr-profile PROFILE BIN [-object BIN,…] [[-object BIN]] [SOURCES]
so the option -format=html needs to go before the profile and binary name.
llvm-cov show -format=html -instr-profile default.profdata test > report.html

Lua: error loading module file not found

I'm trying to set up Lighttpd + lua + fastcgi to run web interface on an embedded MIPS board. But the important part here, I guess is Lua.
When trying to run /usr/local/bin/wsapi.fcgi (which is lua script) I get this error:
/usr/bin/lua: error loading module 'lfcgi' from file '/usr/local/lib/lua/5.1/lfcgi.so':
File not found
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/local/share/lua/5.1/wsapi/fastcgi.lua:9: in main chunk
[C]: in function 'require'
/usr/local/bin/wsapi.fcgi:9: in main chunk
[C]: ?
Which is really strange, because ls shows that file is there and all permissions are ok:
# ls -l /usr/local/lib/lua/5.1/lfcgi.so
-rwxr-xr-x 1 0 0 21152 /usr/local/lib/lua/5.1/lfcgi.so
And which is more frustrating, if I actually remove the file, lua shows a different error, which means that first error wasn't really caused by lua unable to locate file properly.
So I'm a bit lost here, looks like the error message is misleading and problem isn't really the file being not found, but what...
P.S. The error comes from file wsapi/fastcgi.lua, from line 9 which looks like this:
local lfcgi = require"lfcgi"
- maybe there is something wrong with require syntax? I'm no expert in lua so I can't tell.
Ok, I figured it out. It turned out to be a missing dependency, as #Ctx suggested.
readelf -d lfcgi.so | grep NEEDED
shows that it needs libfcgi.so.0 which is a symlink to libfcgi.so and I only have the last one, not the symlink.
After creating the symlink it is working now (actually it comes with another error, but it is a different story :P).
By the way - the error message is really confusing - it looks like the file lfcgi.so is missing, when in fact it is one of its dependencies that is causing the problem.

Mogenerator Assertion failed: (momcTool && "momc not found"), function -[MOGeneratorApp setModel:]

I can't get Mogenerator 1.27 to generate the NSManagedObject classes as I'm getting this error:
Assertion failed: (momcTool && "momc not found"), function -[MOGeneratorApp setModel:], file /tmp/mogenerator-LDeD/mogenerator-1.27/mogenerator.m, line 643.
Abort trap: 6
I'm using this command:
mogenerator -m myApp/myModel.xcdatamodeld/myModel.xcdatamodel -O myApp/Model --template-var arc=true
The exact same command works on my old computer, but not on my new one with the same version of Mogenerator. Why would it not work on my new computer?
You may need to tell Xcode which command line tools to use, in Preferences/Locations. I had accumulated several from Xcode 4, 5 and 6 and this selection had become blank somehow.

Resources