Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyethrecover Program help
#11
OK. Thanks. There were several places where I changed to "as"

Now, I guess I did not do the lib thing correctly. Here is the error:

C:\Users\admin\Desktop\RecoverySetupToRun>python pyethrecover.py -w wallet.json
-s password_spec.txt
Traceback (most recent call last):
  File "pyethrecover.py", line 11, in <module>
    from bitcoin import *
ModuleNotFoundError: No module named 'bitcoin'
C:\Users\admin\Desktop\RecoverySetupToRun>
Reply
#12
That's still the same error.  Have you installed the bitcoin package?
The github repo you linked to calls itself "python-bitcoinlib" https://github.com/petertodd/python-bitc...r/setup.py.

That's important, since there's A LOT of bitcoin packages (here's just a small snippet of them, found from "pip search bitcoin"):
Output:
bit (0.3.1)                      - Bitcoin made easy. bitaddress (0.1)                 - Generate bitcoin addresses DeSW-Bitcoin (0.0.2)             - Bitcoin plugin for the desw wallet                                   platform. yubico-bitcoin (0.0.1)           - UNKNOWN bitcoin-python3 (0.3.1)          - Friendly Bitcoin JSON-RPC API binding for                                   Python 3 django-bitcoin (0.2)             - Bitcoin application integration for Django                                   web framework sqlalchemy-bitcoin (0.0.2)       - A collection of tables and class mappings                                   for storage and retrieval of bitcoin                                   protocol structures to a SQLAlchemy backing                                   store. bitcoin-python (0.3)             - Friendly Bitcoin JSON-RPC API binding for                                   Python dj-bitcoin (0.0.4)               - Django helpers for working with bitcoin python-bitcoin (0.0.10)          - A collection of serialization and utility                                   methods needed to implement the bitcoin                                   protocol. bitcoin (1.1.42)                 - Python Bitcoin Tools bitcoinacceptor (0.0.4)          - Accept Bitcoin without spending Bitcoin python-bitcoinaddress (0.2.2)    - Python bitcoin address validation bitcoinapi (0.1.17)              - Bitcoin API module bitcoinaverage (0.1.15)          - Library to integrate with the                                   BitcoinAverage API BitcoinExchangeFH (0.1.1rc5)     - Cryptocurrency exchange market data feed                                   handler. python-bitcoinlib (0.7.0)        - bitcoinlib (0.3.0.16)            - Bitcoin and Other cryptocurrency Library bitcoinpaygate (0.2)             - The python client for Bitcoinpaygate API bitcoinpy (0.1)                  - Powerfull bitcoin module python-bitcoinrpc (1.0)          - Enhanced version of python-jsonrpc for use                                   with Bitcoin bitcoins (0.0.0)                 - Python Bitcoins for Humans. bitcoinscript (0.1.1)            - Friendly interface for bitcoin scripts bitcoinspend (0.1.6)             - Secure Bitcoin spend bitcointools (1.1.44)            - Python Bitcoin Tools bitcoinWebRPC (0.101)            - Bitcoin WebRPC for Python
Reply
#13
Again, check the version of Python in your script. After installing the bitcoin module, if you try to install it one more time, in the output you have the path where the module is installed. You can see if it's under path/python3.x/dist-packages or path/python2.7/dist-packages
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#14
OK. Thanks. I seem to have had the wrong one. Got the right one now but ...

C:\Users\admin\Desktop\RecoverySetupToRun\python-bitcoinlib-master>python setup.
py
C:\Users\admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setup
tools\dist.py:340: UserWarning: The version specified ('0.7.1-SNAPSHOT') is an i
nvalid version, this may not work as expected with newer versions of setuptools,
pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied

C:\Users\admin\Desktop\RecoverySetupToRun\python-bitcoinlib-master>
Reply
#15
What error do you get if you try to install through pip, instead of manually running the setup file?
Reply
#16
(Mar-27-2017, 05:39 PM)wavic Wrote: Again, check the version of Python in your script. After installing the bitcoin module, if you try to install it one more time, in the output you have the path where the module is installed. You can see if it's under path/python3.x/dist-packages or path/python2.7/dist-packages

I find it here:

C:\Users\admin\AppData\Local\Programs\Python\Python36-32

Maybe I should start over?

(Mar-27-2017, 06:03 PM)nilamo Wrote: What error do you get if you try to install through pip, instead of manually running the setup file?


C:\Users\admin\Desktop\RecoverySetupToRun\python-bitcoinlib-master>pip install b
itcoin
Collecting bitcoin
  Downloading bitcoin-1.1.42.tar.gz
Installing collected packages: bitcoin
  Running setup.py install for bitcoin ... done
Successfully installed bitcoin-1.1.42
C:\Users\admin\Desktop\RecoverySetupToRun\python-bitcoinlib-master>

OK. Maybe we are getting there.

When I run it now, I am missing another lib - joblib

I knew I might need this as the program says so. Now I have to figure out where to find it.

C:\Users\admin\Desktop\RecoverySetupToRun>python pyethrecover.py -w wallet.json
-s password_spec.txt
Traceback (most recent call last):
  File "pyethrecover.py", line 14, in <module>
    from joblib import Parallel, delayed
ModuleNotFoundError: No module named 'joblib'
C:\Users\admin\Desktop\RecoverySetupToRun>
Reply
#17
Output:
pip search joblib joblib (0.11) - Lightweight pipelining: using Python functions as pipeline jobs.
Looks like you can just install that through pip as well.
Reply
#18
Thanks so much. It looks like the program may be running. Now to learn how to use it.

However, This is an error I am now getting:

C:\Users\admin\Desktop\RecoverySetupToRun>python pyethrecover.py -w wallet -s pa
ssword_spec.txt
Traceback (most recent call last):
  File "pyethrecover.py", line 229, in <module>
    __main__()
  File "pyethrecover.py", line 216, in __main__
    grammar = eval(file(options.pwsfile, 'r').read())
NameError: name 'file' is not defined
C:\Users\admin\Desktop\RecoverySetupToRun>

Can you make heads or tails of it?
Reply
#19
Yeah. On line 216 of the file you're running, pyethrecover.py, you're referring to an undefined variable.

You're using it just like the open function (passing a file name, read/write flag, and reading from the result), so you could just replace "file" with "open" and it'd work. But it also means whoever wrote that doesn't believe in closing their file handles, and they also like eval, so I'd personally stop there and avoid using it lol
Reply
#20
Yes, you are again hit with python2 / python3 incompability. While in python2 it was possible to use either file() or open() to open file (with open() preferred), in python3 file() was removed, so only open() is used. You can again try to convert it for python3 with replacing file(... with open(..

But honestly, you are trying to run python2 program with python3, so its possible that even after you correct this, another error due to incompability will raise. Perhaps its worth to consider to try it run with python2.7...
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020