Hey @Michael Tievenow Thanks for bringing this up. I will create a task to track this bug and work on it.
The issue that you are seeing is because of the Mypy saying that it is expecting the method run_extractor to have the following set of arguments in this order:
- CogniteClient
- AbstractStateStore
- Any
- CancellationToken
or
- None as in no arguments at all
Currently the arguments of the method run_extractor are of the following type:
- CogniteClient
- AbstractStateStore
- Config
- Event
The problem is being caused by the type of the last argument which is of type `Event` but is expected to be CancellationToken
While we look into fixing this issue with `cogex init`, I wanted to provide the solution so you are unblocked by this:
In the file `csv_extractor/extractor,py`,
- Add the following import statement:
from cognite.extractorutils.threading import CancellationToken
- modify the definition of the method `run_extractor`
def run_extractor(cognite: CogniteClient, states: AbstractStateStore, config: Config, stop_event: CancellationToken) -> None:
This should fix the problem of you being unable to push the code.