Grasia / dao-scripts

Scripts to get data for the DAO-Analyzer dataset
https://www.kaggle.com/datasets/daviddavo/dao-analyzer
GNU General Public License v3.0
0 stars 0 forks source link

Fix aragon/casts #4

Closed daviddavo closed 1 year ago

daviddavo commented 1 year ago

It raises the following error:

Running collector aragon/casts (mainnet)
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/dao_analyzer/cache_scripts/common/common.py", line 247, in run
    c.run(
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/dao_analyzer/cache_scripts/common/graphql.py", line 136, in run
    data = self.requester.n_requests(query=self.query_cb(prev_block), block_hash=block.id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/dao_analyzer/cache_scripts/common/api_requester.py", line 146, in n_requests
    result = self.request_single(query(**query_args))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/dao_analyzer/cache_scripts/common/api_requester.py", line 115, in request_single
    result = self.request(q)
             ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/dao_analyzer/cache_scripts/common/api_requester.py", line 105, in request
    result = self.__client.execute(dsl_gql(query))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/gql/client.py", line 411, in execute
    return self.execute_sync(
           ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/gql/client.py", line 229, in execute_sync
    return session.execute(
           ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/gql/client.py", line 856, in execute
    result = self._execute(
             ^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/gql/client.py", line 751, in _execute
    self.client.validate(document)
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/gql/client.py", line 1[54](https://github.com/Grasia/dao-scripts/actions/runs/5607308113/jobs/10258331287#step:5:55), in validate
    validation_errors = validate(self.schema, document)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/validate.py", line 73, in validate
    visit(document_ast, TypeInfoVisitor(type_info, ParallelVisitor(visitors)))
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/language/visitor.py", line 257, in visit
    result = visit_fn(node, key, parent, path, ancestors)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/utilities/type_info.py", line 280, in enter
    result = fn(node, *args)
             ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/language/visitor.py", line 339, in enter
    result = fn(node, *args)
             ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line 76, in enter_selection_set
    conflicts = find_conflicts_within_selection_set(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line 184, in find_conflicts_within_selection_set
    collect_conflicts_within(
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line 462, in collect_conflicts_within
    conflict = find_conflict(
               ^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line [56](https://github.com/Grasia/dao-scripts/actions/runs/5607308113/jobs/10258331287#step:5:57)5, in find_conflict
    if not same_streams(directives1, directives2):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line 622, in same_streams
    stream1 = get_stream_directive(directives1)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/graphql/validation/rules/overlapping_fields_can_be_merged.py", line [61](https://github.com/Grasia/dao-scripts/actions/runs/5607308113/jobs/10258331287#step:5:62)3, in get_stream_directive
    for directive in directives:
TypeError: 'NoneType' object is not iterable