Closed testpuddle closed 2 years ago
This is fixed on the main branch, but not published to pypi yet, please try to reinstall ic-py:
pip3 uninstall ic-py git clone git@github.com:rocklabs-io/ic-py.git cd ic-py pip3 install ./
Then you should be good to go.
Thank you. The package works perfectly under WSL2 with Ubuntu20.04 LTS. :) I could not get it to run under Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32
This is not urgent and when it is repackaged under Pypi it should work.
For your info, I got the following error:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\dddi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dddi\AppData\Local\Temp\pip-req-build-uq7ro8b3\setup.py'"'"'; file='"'"'C:\Users\dddi\AppData\Local\Temp\pip-req-build-uq7ro8b3\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\trrei\AppData\Local\Temp\pip-pip-egg-info-o8kqjc1e'
cwd: C:\Users\dddi\AppData\Local\Temp\pip-req-build-uq7ro8b3\
Complete output (7 lines):
Traceback (most recent call last):
File "
Running name = agent.query_raw("gvbup-jyaaa-aaaah-qcdwa-cai", "name", encode([])) works. It provides the response: [{'type': 'text', 'value': 'XTC Test'}]
Changing the method from name to symbol as follows: name = agent.query_raw("gvbup-jyaaa-aaaah-qcdwa-cai", "symbol, encode([])) works in DFX and returns ("XTC").
In python, it generates an exception:
Exception has occurred: AttributeError 'NoneType' object has no attribute 'name' File "C:\Users\trrei\py\Untitled-1.py", line 14, in
name = agent.query_raw("gvbup-jyaaa-aaaah-qcdwa-cai", "symbol", encode([]))
Both the name and symbol methods are text fields per the info in ic.rocks.