Giter VIP home page Giter VIP logo

Comments (4)

droserasprout avatar droserasprout commented on June 12, 2024

Hi, and thanks for reaching out! tzkt_testnet datasource has an incorrect URL. Replace it with https://api.hangzhou2net.tzkt.io (api part is missing in your example). Works fine for me after this change.

from dipdup.

smak0v avatar smak0v commented on June 12, 2024

I changed the URL to https://api.hangzhou2net.tzkt.io and it doesn't work for me :(

Here is the error:

INFO     dipdup.codegen       Creating package `crypto_horses`
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses`
INFO     dipdup.utils         Creating file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/__init__.py`
INFO     dipdup.utils         Writing into file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/models.py`
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/handlers`
INFO     dipdup.utils         Creating file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/handlers/__init__.py`
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/hooks`
INFO     dipdup.utils         Creating file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/hooks/__init__.py`
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/sql`
INFO     dipdup.utils         Creating file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/sql/.keep`
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/graphql`
INFO     dipdup.utils         Creating file `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/graphql/.keep`
INFO     dipdup.codegen       Initializing project
INFO     dipdup.codegen       Creating `schemas` directory
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/schemas`
INFO     dipdup.codegen       Fetching schemas for contract `KT1WgoWgvKJiQ43MkeLoG7LtSZMxeED7Rn8T`
INFO     dipdup.tzkt          tzkt_testnet: Fetching jsonschemas for address `KT1WgoWgvKJiQ43MkeLoG7LtSZMxeED7Rn8T
INFO     dipdup.utils         Creating directory `/Users/smak0v/hackatons/crypto-horses-backend/crypto_horses/schemas/crypto_horses`
Traceback (most recent call last):
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/bin/dipdup", line 8, in <module>
    sys.exit(cli())
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 1150, in __call__
    return anyio.run(self._main, main, args, kwargs, **({"backend":_anyio_backend} if _anyio_backend is not None else {}))
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 56, in run
    return asynclib.run(func, *args, **backend_options)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 233, in run
    return native_run(wrapper(), debug=debug)
  File "/usr/local/Cellar/[email protected]/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/Cellar/[email protected]/3.9.8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 228, in wrapper
    return await func(*args)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 1153, in _main
    return await main(*args, **kwargs)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 1074, in main
    rv = await self.invoke(ctx)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 1684, in invoke
    return await _process_result(await sub_ctx.command.invoke(sub_ctx))
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 1420, in invoke
    return await ctx.invoke(self.callback, **ctx.params)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/asyncclick/core.py", line 774, in invoke
    rv = await rv
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/dipdup/cli.py", line 94, in wrapper
    await fn(*args, **kwargs)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/dipdup/cli.py", line 226, in init
    await dipdup.init(overwrite_types, keep_schemas)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/dipdup/dipdup.py", line 338, in init
    await self._codegen.init(overwrite_types, keep_schemas)
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/dipdup/codegen.py", line 112, in init
    await self.fetch_schemas()
  File "/Users/smak0v/Library/Caches/pypoetry/virtualenvs/crypto-horses-backend-bWHOXJn--py3.9/lib/python3.9/site-packages/dipdup/codegen.py", line 183, in fetch_schemas
    storage_schema = preprocess_storage_jsonschema(contract_schemas['storageSchema'])
TypeError: byte indices must be integers or slices, not str
________________________________________________________________________________

Unexpected error occurred!

Please file a bug report at https://github.com/dipdup-net/dipdup/issues and attach the following:

  * `dipdup.yml` config. Make sure to remove sensitive information.
  * Reasonable amount of logs before the crash.

from dipdup.

droserasprout avatar droserasprout commented on June 12, 2024

Sorry, it appears you also need to run dipdup cache clear command. Due to a bug, an invalid API response was cached on the disk.

from dipdup.

smak0v avatar smak0v commented on June 12, 2024

Yeah, it works
Thank you!

from dipdup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.