Hello,
I’m trying blockcerts, creating models of the certificates (certools) with success.
But, changing parameters I realize that when the hash_emails is turned on (true), the instantiate script throws an error.
/
helpers.py", line 53, in encode
** num, rem = divmod(num, base)**
TypeError: unsupported operand type(s) for divmod(): ‘bytes’ and 'int’
If I remove, or setup the hash_emails to false, the program execute with success.
/
Writing certificates to /ufp/unsigned
Instantiated batch!
To make sure, that the problem wasn’t with my own model, I reproduce the same error in conf.ini from documentation (sample_data). I just added hash_emails=true on file and tried to create and instantiate the process… and the same error kept happening. Turning again the parameter hash_emails to false, everything back to work…
Could someone help me to understand if this is really a Bug, or if i’m doing something wrong ?
Thanks.
(I already tried False ou false, case sensitive…)
Hey @Fernando, sorry for the delay. I’m not getting this issue when setting the hash_emails
flag. Verified that the test.json file does show hashed: true
Are you running this in a virtual environment?
Hello,
No, I’m not using a virtual environment or dock… I installed all components in operation system to create my own environment.
I’m tested in Linux Ubuntu 18.04 and Mac Os mojave, and both the same issue.
I think it should be a problem with Python version to work with boolean type, probability when trying to convert True To 1 or 1 to True…
I googled and I found some cases with the same error ( TypeError: unsupported operand type(s) for divmod(): ‘bytes’ and 'int’) related with python version > 3.5. What version’s installed in virtual envinroment ?
Att,
Fernando.
It might be related to python version, in my virtual environment, apparently i’m at Python 2.7.10
. I can try to kick up a virtual environment using 3.6 to see if I reproduce the problem, but in the mean time if you wanted to try python 2.7.10 that might get passed your immediate issue.
Here’s the instruction for starting the virtual environment: https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/virtualenv.md