GoEvaCom / eosjs_python

http://eva.coop/
MIT License
43 stars 9 forks source link

Windows messes things up #20

Open ChrisHoffmann96 opened 3 years ago

ChrisHoffmann96 commented 3 years ago

Hi,

im tryting to push a transaction to the chain using your framework - thanks for that btw - in Windows. eos.push_transaction('eosio.token', 'transfer', 'x', 'active', {'from': 'x', 'to': 'y', 'quantity': '0.1 WAX', 'memo': ''} )

which works fine on mac, but on windows i get this weird error:

eosjs_python.Exceptions.PushContractTransactionException: b"undefined:1\r\n'{from:\r\n^\r\n\r\nSyntaxError: Unexpected token ' in JSON at position 0\r\n at JSON.parse ()\r\n at Object. (paths\eosjs_python\js\PushContractTransaction.js:10:26)\r\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\r\n at Module.load (internal/modules/cjs/loader.js:928:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\r\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\r\n at internal/main/run_main_module.js:17:47\r\n"

Which kinda looks like a windows line ending error. But I don't really know how to fix this cause the error gets thrown within the eosjs_python module. Any help would be appreciated!

ChrisHoffmann96 commented 3 years ago

Noone?

ChrisHoffmann96 commented 3 years ago

I did some debugging, and after parsing arguments in push_transaction of init.py, the argument string looks like that:

'https://wax.greymass.com' '1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4' 'private_key_here' 'e.rplanet' 'transfer' 'hypercruse45' 'active' '{"from": "hypercruse45", "to": "a.rplanet", "quantity": "10000.0000 AETHER", "memo": "buy:10000,EARTH"}'

which looks fine, but I'm still getting the error mentioned above

Any help would be appreciated!