Traceback (most recent call last):


 "/opt/project/src/server.py", line 54, in <module>

asyncio.run(main())


 "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run

return loop.run_until_complete(main)


 "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete

return future.result()


 "/opt/project/src/server.py", line 47, in main

async for item in ModelOne.all().prefetch_related('many_to_many'):


 "/usr/local/lib/python3.7/site-packages/tortoise/queryset.py", line 512, in __aiter__

for val in await self:


 "/usr/local/lib/python3.7/site-packages/tortoise/queryset.py", line 521, in _execute

).execute_select(self.query, custom_fields=list(self._annotations.keys()))


 "/usr/local/lib/python3.7/site-packages/tortoise/backends/base/executor.py", line 90, in execute_select

await self._execute_prefetch_queries(instance_list)


 "/usr/local/lib/python3.7/site-packages/tortoise/backends/base/executor.py", line 327, in _execute_prefetch_queries

await self._do_prefetch(instance_list, field, related_query)


 "/usr/local/lib/python3.7/site-packages/tortoise/backends/base/executor.py", line 320, in _do_prefetch

return await self._prefetch_m2m_relation(instance_id_list, field, related_query)


 "/usr/local/lib/python3.7/site-packages/tortoise/backends/base/executor.py", line 232, in _prefetch_m2m_relation

*[getattr(related_query_table, field).as_(field) for field in related_query.fields],


 "/usr/local/lib/python3.7/site-packages/tortoise/backends/base/executor.py", line 232, in <listcomp>

*[getattr(related_query_table, field).as_(field) for field in related_query.fields],
AttributeError: 'NoneType' object has no attribute 'as_'

Traceback (most recent call last):


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/bin/.mypy-wrapped", line 12, in <module>

sys.exit(console_entry())


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/__main__.py", line 7, in console_entry

main(None)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/main.py", line 91, in main

res = type_check_only(sources, bin_dir, options, flush_errors, fscache)
# noqa


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/main.py", line 148, in type_check_only

fscache=fscache)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 177, in build

flush_errors, fscache)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 350, in _build

graph = dispatch(sources, manager)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 2560, in dispatch

process_graph(graph, manager)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 2853, in process_graph

process_stale_scc(graph, scc, manager)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 2976, in process_stale_scc

graph[id].type_check_first_pass()


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/build.py", line 2151, in type_check_first_pass

self.type_checker().check_first_pass()


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 253, in check_first_pass

self.accept(d)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 352, in accept

stmt.accept(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 808, in accept

return visitor.visit_class_def(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 1368, in visit_class_def

self.accept(defn.defs)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 352, in accept

stmt.accept(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 873, in accept

return visitor.visit_block(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 1514, in visit_block

self.accept(s)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 352, in accept

stmt.accept(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 591, in accept

return visitor.visit_func_def(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 663, in visit_func_def

self._visit_func_def(defn)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 667, in _visit_func_def

self.check_func_item(defn, name=defn.name())


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 729, in check_func_item

self.check_func_def(defn, typ, name)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 746, in check_func_def

for item, typ in self.expand_typevars(defn, typ):


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 1189, in expand_typevars

result.append((expand_func(defn, mapping), expanded))


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/checker.py", line 3612, in expand_func

ret = defn.accept(visitor)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 591, in accept

return visitor.visit_func_def(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 108, in visit_func_def

self.block(node.body),


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 537, in block

new = self.visit_block(block)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 183, in visit_block

return Block(self.statements(node.body))


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 548, in statements

return [self.stmt(stmt) for stmt in statements]


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 548, in <listcomp>

return [self.stmt(stmt) for stmt in statements]


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 521, in stmt

new = stmt.accept(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 888, in accept

return visitor.visit_expression_stmt(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 213, in visit_expression_stmt

return ExpressionStmt(self.expr(node.expr))


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 515, in expr

new = expr.accept(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/nodes.py", line 1670, in accept

return visitor.visit_dict_expr(self)


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 408, in visit_dict_expr

for key, value in node.items])


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 408, in <listcomp>

for key, value in node.items])


 "/nix/store/32h62f2vx423bp9nhlhv1lm4jad99cmg-python3.6-mypy-0.620/lib/python3.6/site-packages/mypy/treetransform.py", line 515, in expr

new = expr.accept(self)
AttributeError: 'NoneType' object has no attribute 'accept'
