 Good evening Steem Scripters, I had recently exercised what I like to call the nuclear option regarding my Ubuntu virtual machine when I began receiving NoneType errors. In other words, I completely blew away my VM and started from scratch. Well, in retrospect, that may have not been the least painful way I could have addressed the problem but resulted in a couple good things namely the upgrade of my OS and Python. Turns out it was the node that I was connecting that was having issues but that's unimportant now. What is important is I understand other Steem scripters may be having issues with the libraries and I wanted to share a prospective fix for one that seemed to assist in my issue. I was encountering errors when attempting to add a new key. I received the following error which I just duplicated. (b was a sample bytecode string I had generated but I was receiving the same upon using the related library function) >aes = AES.new(b) Traceback (most recent call last): File "stdin", line 1, in module TypeError: new() missing 1 required positional argument: 'mode' What was the fix you might ask? It took me a bit of investigating and I came accross the following page with info on the AES module: https://pythonhosted.org/pycrypto/Crypto.Cipher.AES-module.html Here is the function:  Details  Notice the "Mode" parameter. Hmmm remember that error? >mode (a MODE_* constant) - The chaining mode to use for encryption or decryption. Default is MODE_ECB. If we examine the BIP38.py wallet script in the steembase directory, we will notice that the mode argument is absent. What if we were to add it? That's exactly what I did to both the encrypt and decrypt functions. After that, I was able to successful add the key and perform voting operations with python. Here is the line you will need to replace. > aes = AES.new(derived_half2,AES.MODE_ECB) I will also note that, if my memory serves me, I had encountered issues with the requires file involving versioning of dependences (toml among them I think). If there is demand, I will look into creating an article for that as well. Please, let me know if this helps you or, if there are any questions, feel free to drop a comment. Upvote, Resteem, and comment if you want to show some love 💖 and 👀 more! To tip crypto, you may also use the following addresses: https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin.png BTC wallet: 1BKV8gfFbWgeVJVqedsDj9TX9TWGxpCSEh https://files.coinmarketcap.com/static/img/coins/16x16/ethereum.png ETH: 0xaC8920ACaD58C40c46B75E13957605c72770C2Ca https://files.coinmarketcap.com/static/img/coins/16x16/litecoin.png LTC wallet: LfP1he2KyZzGJYXwbSNdfLZ6wUNL71nBvt https://files.coinmarketcap.com/static/img/coins/16x16/dogecoin.png DOGE wallet: DNAQbrku7HmxDSX8RayHp6cv4mum5XGERe https://files.coinmarketcap.com/static/img/coins/16x16/dash.png DASH wallet: XbfzvP7Jt3LaMe2x1ho97uJp4TdfiZ9C1W https://files.coinmarketcap.com/static/img/coins/16x16/blackcoin.png BLK: BBXcqjeqYdREt9ExSN6jduL7kEh6YjY2RF https://files.coinmarketcap.com/static/img/coins/16x16/veriumreserve.png VRM: VWFPCf7DmHYhQbXtV2SNRdCdo4LkMjFAkR https://steemitimages.com/0x0/https://img.esteem.ws/gginnpbr1h.jpg
author | anthonyadavisii |
---|---|
permlink | steem-python-bip38-wallet-error-with-fix |
category | steemdev |
json_metadata | {"tags":["steemdev","steempython","python","steem","steemthatshare"],"image":["https://steemitimages.com/DQmS7joWnTrfYrcfJMu31hdmuQjhpST6FJuX5D5c18CkH2n/steem%20python.jpg","https://steemitimages.com/DQmZsss7Pu3TxwDunTrJVa4Ckf4oMsUf2hvNtgz6vzPrPiE/image.png","https://steemitimages.com/DQmZZfKJMzTVr9FQFLpd6EcAjQ81jkSAecaCjAJeQLJhXh5/image.png","https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin.png","https://files.coinmarketcap.com/static/img/coins/16x16/ethereum.png","https://files.coinmarketcap.com/static/img/coins/16x16/litecoin.png","https://files.coinmarketcap.com/static/img/coins/16x16/dogecoin.png","https://files.coinmarketcap.com/static/img/coins/16x16/dash.png","https://files.coinmarketcap.com/static/img/coins/16x16/blackcoin.png","https://files.coinmarketcap.com/static/img/coins/16x16/veriumreserve.png","https://steemitimages.com/0x0/https://img.esteem.ws/gginnpbr1h.jpg"],"links":["https://pythonhosted.org/pycrypto/Crypto.Cipher.AES-module.html"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-12-29 04:37:06 |
last_update | 2017-12-29 15:32:21 |
depth | 0 |
children | 3 |
last_payout | 2018-01-05 04:37:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.978 HBD |
curator_payout_value | 0.296 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,503 |
author_reputation | 212,565,147,344,592 |
root_title | "Steem Python BIP38 Wallet Error with Fix" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 25,805,685 |
net_rshares | 95,992,494,536 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
mmikhail | 0 | 942,225,917 | 6% | ||
lydon.sipe | 0 | 36,072,852,207 | 20.73% | ||
cbcheek | 0 | 494,096,296 | 50% | ||
binkgirl | 0 | 1,010,257,897 | 50% | ||
jeffhand | 0 | 2,591,504,503 | 100% | ||
mggiodev | 0 | 53,774,926,393 | 100% | ||
steemthatyes | 0 | 434,499,162 | 50% | ||
fherdz | 0 | 551,232,316 | 100% | ||
steemlist | 0 | 120,899,845 | 50% |
had same problem, pull request submitted https://github.com/steemit/steem-python/pull/245
author | boombastic |
---|---|
permlink | re-anthonyadavisii-steem-python-bip38-wallet-error-with-fix-20180606t181828791z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"links":["https://github.com/steemit/steem-python/pull/245"],"app":"steemit/0.1"} |
created | 2018-06-06 18:18:30 |
last_update | 2018-06-06 18:18:30 |
depth | 1 |
children | 1 |
last_payout | 2018-06-13 18:18:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.017 HBD |
curator_payout_value | 0.003 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 89 |
author_reputation | 3,736,161,083,342 |
root_title | "Steem Python BIP38 Wallet Error with Fix" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 59,567,393 |
net_rshares | 8,241,908,361 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anthonyadavisii | 0 | 6,438,176,763 | 33% | ||
smartmeme | 0 | 1,803,731,598 | 100% |
# EDIT: Thanks for not telling me to use beempy!!  Wow, thanks it helped! Not sure why they release stuff with errors? lol 2019-06-09 14:59:17 ☆ nickademous in ~ ± |master ↑1 ↓2 S:387 U:367 ?:474 ✗| → steempy importaccount coininstant Account Passphrase: Importing active key! Passphrase: Importing posting key! Importing memo key!
author | coininstant |
---|---|
permlink | psuz3c |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1","image":["https://cdn.steemitimages.com/DQmfDhHprGMx8Lq9LY2Rm51d9No9TdUUy3EQBhZ6J9C5Mk4/A560CEDF-37CE-4AFA-A241-A59A98253AD2.png"]} |
created | 2019-06-10 01:06:48 |
last_update | 2019-06-10 22:59:42 |
depth | 2 |
children | 0 |
last_payout | 2019-06-17 01:06:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 498 |
author_reputation | 87,712,212,981,650 |
root_title | "Steem Python BIP38 Wallet Error with Fix" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 86,348,683 |
net_rshares | -1,620,633,044 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
coininstant | 0 | 55,294,756,654 | 100% | ||
abusereports | 0 | -56,915,389,698 | -2% |
100% upvote for support... great information.
author | mggiodev |
---|---|
permlink | re-anthonyadavisii-steem-python-bip38-wallet-error-with-fix-20180101t032358402z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2018-01-01 03:23:57 |
last_update | 2018-01-01 03:23:57 |
depth | 1 |
children | 0 |
last_payout | 2018-01-08 03:23:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.326 HBD |
curator_payout_value | 0.051 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 45 |
author_reputation | 428,991,678,035 |
root_title | "Steem Python BIP38 Wallet Error with Fix" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 26,306,667 |
net_rshares | 30,835,439,129 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anthonyadavisii | 0 | 25,397,525,225 | 100% | ||
mggiodev | 0 | 5,437,913,904 | 10% |