Closed billygarrison closed 3 years ago
@billygarrison
This may sound like your python setup is messed up.
Do you only have troubles using the feeadjuster or any other plugin or even just the daemon without plugins?
What baffles me is that it tries to read pyln.client code from /var/mail from: can't read /var/mail/pyln.client
.
Try the following:
lightningd
. I use this when running from sources:
PYTHONPATH=$PYTHONPATH:${PWD}/contrib/pylightning:${PWD}/contrib/pyln-client:${PWD}/contrib/pyln-testing:${PWD}/contrib/pyln-proto
python
pointing to python3
if thats possible for youpip3 install --user -r feeadjuster/requirements.txt
pip3 install --user \
-r requirements.txt \
-r contrib/pyln-client/requirements.txt \
-r contrib/pyln-proto/requirements.txt \
-r contrib/pyln-testing/requirements.txt \
-r contrib/pylightning/requirements.txt"
Thank you for the advice @m-schmoock but unfortunately none of that worked.
I use the eye of satoshi watchtower plugin which uses the same from pyln.client import Plugin
, although it doesn't import RpcError. When I run python in the console and try doing the same imports they work fine.
I figured out the issue...
I had copy + pasted the code for feeadjuster.py
from GitHub to a new file and saved it + modified the permissions as directed. But something went wrong... Maybe I copied incorrectly and made the script invalid, or maybe I made a mistake when trying to do chmod a+x
. Either way, cloning the repo and using that script instead fixed the problem.
I tried re-doing my steps of copy + paste + chmod and can't reproduce the error so I'm assuming I just did something wrong the first time.
For anyone interested (@m-schmoock) - the reason it tried looking in /var/mail
is because it didn't run the code as Python code but instead ran it as a shell command. For example, if you try running in the terminal from blahblahblah
you'll get from: can't read /var/mail/blahblahblah
. Something to do with checking mail from that address/account or something.
@billygarrison
Good to know. Maybe you missed to copy the first comment line which tells the shell to use python interpreter (#!/usr/bin/env python
"). In this case it would try to execute it as shell
When I try to run lightningd with the feeadjuster plugin I get the following error
Not sure if related, but the
python
alias is for Python 2 and I usepython3
for Python 3.Also not sure if there is supposed to be something in
/var/mail/
but that directory is empty. When I runpip3 install pyln-client
I get the following message: