-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to execute any function. Node used: http://eos.greymass.com (Error: Only Absolute URLs are supported) (Traceback Attached) #3
Comments
it seems you have an error on the url of your nodeos, you only need to provide your base url
|
I first tried base url (https://eos.greymass.com) but that was also not working. Traceback below: GetBalanceException Traceback (most recent call last) ~\Anaconda3\lib\site-packages\eosjs_python_init_.py in get_currency_balance(self, code, account, symbol) GetBalanceException: b'api < error \t 'http://eos.greymass.com\'/v1/chain/get_info {}\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getInfo (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at checkChainId (C:\Users\admin\node_modules\eosjs\lib\index.js:431:11)\n at createEos (C:\Users\admin\node_modules\eosjs\lib\index.js:85:5)\n at Eos (C:\Users\admin\node_modules\eosjs\lib\index.js:42:10)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:10:7)\napi < error \t 'http://eos.greymass.com\'/v1/chain/get_currency_balance {"code":"'eosio.token'","account":"'eoscanadacom'","symbol":"'EOS'","json":true}\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getCurrencyBalance (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:15:5)\n at Module._compile (module.js:643:30)\n at Object.Module._extensions..js (module.js:654:10)\n at Module.load (module.js:556:32)\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getInfo (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at checkChainId (C:\Users\admin\node_modules\eosjs\lib\index.js:431:11)\n at createEos (C:\Users\admin\node_modules\eosjs\lib\index.js:85:5)\n at Eos (C:\Users\admin\node_modules\eosjs\lib\index.js:42:10)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:10:7)\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getCurrencyBalance (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:15:5)\n at Module._compile (module.js:643:30)\n at Object.Module._extensions..js (module.js:654:10)\n at Module.load (module.js:556:32) |
can you share your code snippet? I don't understand why your nodeosd link is broken ? |
Below is the code snippet: |
you need to add you the private key when you initiate your Eos class . like this
|
Thank you very much for the quick replies. However, I added my private key everytime. Just that I didn't disclose it. Maybe I should have pasted the below code snippet: from eosjs_python import Eos Also, I upgraded the eosjs_python to 0.1.61 after you corrected the json parsing error some 10 hours back. But the exact same error is showing up. I guess it's because somewhere in the code, its adding \ to the node URL. Also its adding "/n", "/t" everywhere. Thanks |
Same problem here...does anyone know where is a problem? |
GetBalanceException Traceback (most recent call last)
in ()
1 #eos.get_currency_balance()
----> 2 eos.get_currency_balance('eosio.token', 'eoscanadacom', 'EOS')
~\Anaconda3\lib\site-packages\eosjs_python_init_.py in get_currency_balance(self, code, account, symbol)
98 return json_value_ans
99 else:
--> 100 raise GetBalanceException(response.stderr)
101
102
GetBalanceException: b'api < error \t 'https://eos.greymass.com:443\'/v1/chain/get_info {}\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getInfo (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at checkChainId (C:\Users\admin\node_modules\eosjs\lib\index.js:431:11)\n at createEos (C:\Users\admin\node_modules\eosjs\lib\index.js:85:5)\n at Eos (C:\Users\admin\node_modules\eosjs\lib\index.js:42:10)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:10:7)\napi < error \t 'https://eos.greymass.com:443\'/v1/chain/get_currency_balance {"code":"'eosio.token'","account":"'eoscanadacom'","symbol":"'EOS'","json":true}\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getCurrencyBalance (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:15:5)\n at Module._compile (module.js:643:30)\n at Object.Module._extensions..js (module.js:654:10)\n at Module.load (module.js:556:32)\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getInfo (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at checkChainId (C:\Users\admin\node_modules\eosjs\lib\index.js:431:11)\n at createEos (C:\Users\admin\node_modules\eosjs\lib\index.js:85:5)\n at Eos (C:\Users\admin\node_modules\eosjs\lib\index.js:42:10)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:10:7)\nError: only absolute urls are supported\n at C:\Users\admin\node_modules\node-fetch\index.js:54:10\n at new Promise ()\n at new Fetch (C:\Users\admin\node_modules\node-fetch\index.js:49:9)\n at Fetch (C:\Users\admin\node_modules\node-fetch\index.js:37:10)\n at module.exports (C:\Users\admin\node_modules\isomorphic-fetch\fetch-npm-node.js:8:19)\n at Object.getCurrencyBalance (C:\Users\admin\node_modules\eosjs-api\lib\apigen.js:90:5)\n at Object. (C:\Users\admin\Anaconda3\lib\site-packages\eosjs_python\js\GetCurrencyBalance.js:15:5)\n at Module._compile (module.js:643:30)\n at Object.Module._extensions..js (module.js:654:10)\n at Module.load (module.js:556:32)\n
The text was updated successfully, but these errors were encountered: