21isenough / LightningATM

This ATM sends bitcoin over the Lightning Network - pretty fun.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: module 'requests' has no attribute 'get'

cryptopotamo opened this issue · comments

Hello,

i've followed all the steps to configure the ATM. When i execute ./app.py i recieve this error: AttributeError: module 'requests' has no attribute 'get'.

Traceback (most recent call last):
  File "./app.py", line 12, in <module>
    import config
  File "/home/pi/LightningATM/config.py", line 192, in <module>
    BTCPRICE = utils.get_btc_price(conf["atm"]["cur"])
  File "/home/pi/LightningATM/utils.py", line 51, in get_btc_price
    price = requests.get(
AttributeError: module 'requests' has no attribute 'get'

Can you help me?

Thanks

commented

What did you set in the config.ini for "cur"? It should be eur or usd for the dollar.
image

I set eur. But it seems like if it cannot load the module correctly.

[atm]
# Set your fiat currency with the three letter
# currency code (https://www.xe.com/symbols.php)
cur = eur

i've found this article, but i can't solve the problem anyway: https://stackoverflow.com/questions/12258816/module-object-has-no-attribute-get-python-error-requests

commented

Did you do the last point pip3 install -r requirements.txt too?
image

Yes, i've done also that.
So, i want to try to format all and try again from the first step.
Maybe i've done something wrong at the beginning.

commented

Ok, can happen! But it looks like the module 'requests' is not updatet with the pip3 install -r requirements.txt correctly. Because there it will be updatet. Maybe you have been in the wrong directory if you set the command. Do cd ~/LightningATM bevor you start the pip3 install -r requirements.txt. You can also run the command again. Then you will see whether he has to install something or already had everything.

commented

This is a correct first execution with the orignal image from 2019.

image

Thank you very much.
I'll try again and let you know.

This is a correct first execution with the orignal image from 2019.

image

So, i've formatted everything and reinstalled.
Now it works like a charm. :)

Thanks for the help anyway!