I have a Perl script which calls a bash script. The software I am using is Calibre. When I call this bash script (Calibre's) from my ssh shell, it seems to work fine. However when I call it from my Perl script it throws the following errors:
Traceback (most recent call last):
File "site.py", line 58, in main
File "site-packages/calibre/ebooks/conversion/cli.py", line 307, in main
File "site-packages/calibre/ebooks/conversion/cli.py", line 260, in create_option_parser
File "site-packages/calibre/ebooks/conversion/plumber.py", line 10, in
File "site-packages/calibre/customize/ui.py", line 15, in
File "site-packages/calibre/customize/builtins.py", line 639, in
File "site-packages/calibre/devices/apple/driver.py", line 8, in
File "ctypes/__init__.py", line 555, in
File "ctypes/__init__.py", line 279, in _reset_cache
MemoryError
I posted this in the Calibre mobileread forums and was informed that this was because the Python stdlib module does not load correctly. But I have absolutely no clue what is causing this and how I can get it up and running. I am using bluehosts Linux server. Could someone please help me out?
The way I am calling the bash script from my Perl script is using backticks:
my $output=`sh ebook-convert some.html some.mobi`
I have also tried to use IPC::Run::Simple, but that doesn't work, either.
From my ssh:
pipe size (512 bytes, -p) somenumber
POSIX message queues (bytes, -q) somenumber
real-time priority (-r) somenumber
stack size (kbytes, -s) somenumber
cpu time (seconds, -t) somenumber
max user processes (-u) somenumber
virtual memory (kbytes, -v) somenumber
file locks (-x) somenumber
While that from my Perl script is empty.
Can't exec "ulimit": No such file or directory at tester.pl line 25.