spesmilo / electrum-docs

Documentation for Electrum Bitcoin Wallet
https://docs.electrum.org/
MIT License
126 stars 146 forks source link

What's wrong with Electrum-Merchant #105

Closed anasred closed 4 years ago

anasred commented 4 years ago

I followed all of the steps in:

https://electrum.readthedocs.io/en/latest/merchant.html#

When I reached Install Electrum-Merchant section, I tried python3 -m electrum-merchant and I got the below message:

[2020-05-07 14:28:07,046] [INFO] Downloading and installing files into request directory
[2020-05-07 14:28:07,046] [INFO] copying index.html from flavour simple
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/electrum-merchant/__main__.py", line 133, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/electrum-merchant/__main__.py", line 99, in main
    downloader.download('jquery')
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 70, in download
    self.download_multiple([(name, version)])
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 67, in download_multiple
    loop.run_until_complete(self._download_packages(packages))
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 50, in _download_packages
    for n, v in current_packages]
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 50, in <listcomp>
    for n, v in current_packages]
AttributeError: module 'asyncio' has no attribute 'create_task'
bauerj commented 4 years ago

Please try upgrading to Python 3.7.

anasred commented 4 years ago

this is what I got after upgrading python to 3.7

[2020-05-07 16:15:58,709] [INFO] Downloading and installing files into request directory
[2020-05-07 16:15:58,710] [INFO] copying index.html from flavour simple
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/electrum-merchant/__main__.py", line 133, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/electrum-merchant/__main__.py", line 99, in main
    downloader.download('jquery')
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 70, in download
    self.download_multiple([(name, version)])
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 67, in download_multiple
    loop.run_until_complete(self._download_packages(packages))
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 50, in _download_packages
    for n, v in current_packages]
  File "/usr/local/lib/python3.6/dist-packages/npmdownloader/packagedownloader.py", line 50, in <listcomp>
    for n, v in current_packages]
AttributeError: module 'asyncio' has no attribute 'create_task'
bauerj commented 4 years ago
/usr/lib/python3.6/runpy.py

Are you sure you're starting the right Python?

anasred commented 4 years ago

this seems related to none existed static JS and CSS files that required for online payment to work properly on the payment page.

because I tried the command of

electrum addrequest 3.14 -m "This is how we create payment requests!"

and it generated the json object properly. So I populated the js/css files manually into /vrs/www/payment/static folder and it finally worked.