I'm trying to use Electrum from the command line for a little project of mine using PHP. Running commands from the terminal (in Ubuntu) works just fine. But when I try running them through PHP using something like $output = `/usr/local/bin/electrum listaddresses 2>&1`;, I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/electrum", line 108, in
config = SimpleConfig(config_options)
File "/usr/local/lib/python2.7/dist-packages/electrum/simple_config.py", line 34, in __init__
self.init_path(self.options_config.get('wallet_path'))
File "/usr/local/lib/python2.7/dist-packages/electrum/simple_config.py", line 166, in init_path
if not os.path.exists(self.user_dir):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Do you have any idea why that would be? It's running php on the same machine, with the same owner as I ran in the terminal, so I can't imagine it being a permissions issue.
Thanks a bunch.