Skip to main content
Solved

Not able to setup a extractor with the command "cogex init"


Forum|alt.badge.img+3

Hello!

I tried to setup a simple cogex extractor, but get an error that is not letting me proceed following the course. Please help.

SyntaxWarning: invalid escape sequence '\e'
  """
csv_extractor_2/__main__.py:13: error: Argument "run_handle" to "Extractor" has
incompatible type
"Callable[[CogniteClient, AbstractStateStore, Config, Event], None]"; expected
"Callable[[CogniteClient, AbstractStateStore, Config, CancellationToken], None] | None"
 [arg-type]
            run_handle=run_extractor,
                       ^~~~~~~~~~~~~
Found 1 error in 1 file (checked 4 source files)

 

Best answer by Pasindu Perera

Hi Lavanya,

The run_extractor function is provided with a set of arguments such as cognite, states, config and stop_event. Did you give those arguments? seems like those arguments are missing. Could you please refer below documentations for more information:
https://cognite-extractor-utils.readthedocs-hosted.com/en/latest/uploader.html#tying-it-all-together

https://cognite-extractor-utils.readthedocs-hosted.com/en/latest/quickstart.html#starting-a-new-extractor-project

 

Best regards,

Pasindu Perera.

View original

Pasindu Perera
Seasoned Practitioner
Forum|alt.badge.img+2

Hi Lavanya,

The run_extractor function is provided with a set of arguments such as cognite, states, config and stop_event. Did you give those arguments? seems like those arguments are missing. Could you please refer below documentations for more information:
https://cognite-extractor-utils.readthedocs-hosted.com/en/latest/uploader.html#tying-it-all-together

https://cognite-extractor-utils.readthedocs-hosted.com/en/latest/quickstart.html#starting-a-new-extractor-project

 

Best regards,

Pasindu Perera.


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2

Hi @Lavanya Kannan,

I trust the information provided was beneficial. This thread will now be closed. If you encounter any further issues or require additional assistance, please don't hesitate to start a new discussion. 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings