bitmessagecli crashes when trying to send and you have no own addresses #877

Open
opened 2016-07-13 20:44:52 +02:00 by Musickiller · 2 comments
Musickiller commented 2016-07-13 20:44:52 +02:00 (Migrated from github.com)

python2 bitmessagecli.py
send
M
BM-[some-address]
//error


Would you like to send a (M)essage or (B)roadcast?
> M

What is the To Address?
> BM-[some-address]

     Using the only address in the addressbook to send from.

Traceback (most recent call last):
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1778, in <module>
    main()
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1773, in main
    UI((raw_input('>').lower()).replace(" ", ""))
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1348, in UI
    main()
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1773, in main
    UI((raw_input('>').lower()).replace(" ", ""))
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1492, in UI
    sendMsg(null,null,null,null)
  File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 807, in sendMsg
    fromAddress = jsonAddresses['addresses'][0]['address']
IndexError: list index out of range

the same with broadcasts.

python2 bitmessagecli.py send M BM-[some-address] //error --- ``` Would you like to send a (M)essage or (B)roadcast? > M What is the To Address? > BM-[some-address] Using the only address in the addressbook to send from. Traceback (most recent call last): File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1778, in <module> main() File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1773, in main UI((raw_input('>').lower()).replace(" ", "")) File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1348, in UI main() File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1773, in main UI((raw_input('>').lower()).replace(" ", "")) File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 1492, in UI sendMsg(null,null,null,null) File "/data/data/com.termux/files/home/PyBitmessage/src/bitmessagecli.py", line 807, in sendMsg fromAddress = jsonAddresses['addresses'][0]['address'] IndexError: list index out of range ``` --- the same with broadcasts.
Musickiller commented 2016-07-13 21:05:30 +02:00 (Migrated from github.com)

Woops... I have not generated an address. I guess you should add some check for that. =)

Woops... I have not generated an address. I guess you should add some check for that. =)
Lvl4Sword commented 2017-06-27 00:34:09 +02:00 (Migrated from github.com)

This is fixed in https://github.com/Lvl4Sword/PyBitmessage-CLI/blob/master/bitmessagecli.py
My CLI has very minor bugs, but should be production ready.

Protip: This CLI is designed to replace the current one. So if you get an OSError, you didn't replace it 😃

This is fixed in https://github.com/Lvl4Sword/PyBitmessage-CLI/blob/master/bitmessagecli.py My CLI has very minor bugs, but should be production ready. Protip: This CLI is designed to replace the current one. So if you get an OSError, you didn't replace it 😃
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-08-21#877
No description provided.