Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'get' #12

Closed
microlancer opened this issue Mar 2, 2021 · 1 comment
Closed

AttributeError: 'NoneType' object has no attribute 'get' #12

microlancer opened this issue Mar 2, 2021 · 1 comment

Comments

@microlancer
Copy link
Contributor

Hello, I am trying to run the following:

# charge-lnd --lnddir /home/thorie/.lnd --dry-run -c ./charge.conf

But getting this result:

Traceback (most recent call last):
  File "/home/thorie/python/bin/charge-lnd", line 33, in <module>
    sys.exit(load_entry_point('charge-lnd==0.1.0', 'console_scripts', 'charge-lnd')())
  File "/home/thorie/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 474, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/thorie/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2846, in load_entry_point
    return ep.load()
  File "/home/thorie/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/home/thorie/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/thorie/python/lib/python3.6/site-packages/charge_lnd/charge_lnd.py", line 130, in <module>
    success = main()
  File "/home/thorie/python/lib/python3.6/site-packages/charge_lnd/charge_lnd.py", line 47, in main
    (new_base_fee_msat, new_fee_ppm, new_min_htlc, new_max_htlc, new_time_lock_delta) = policy.execute(channel)
  File "/home/thorie/python/lib/python3.6/site-packages/charge_lnd/policy.py", line 24, in execute
    strategy = self.config.get('strategy', 'ignore')
AttributeError: 'NoneType' object has no attribute 'get'

My config file looks like this:

[discourage-routing-out-of-balance]
chan.max_ratio = 0.1
chan.min_capacity = 25000
strategy = static
base_fee_msat = 10000
fee_ppm = 500

[encourage-routing-to-balance]
chan.min_ratio = 0.9
chan.min_capacity = 25000
strategy = static
base_fee_msat = 1
fee_ppm = 2

Any idea what is wrong?

@microlancer
Copy link
Contributor Author

Nevermind, I added a [default] section and it seems to have fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant