Skip to main content
Maritsa Sarri
Expert ⭐️⭐️⭐️⭐️
Cognite Academy Instructor
March 25, 2022

Data Engineer Basics - Integrations

  • March 25, 2022
  • 59 replies
  • 1488 views

Welcome to the Data Engineer Basics - Integrations!

This discussion is dedicated to help learners of the Data Engineer Basics – Integrations learning path succeed. If you’re struggling any of the courses in this learning path, post a comment with the challenge you’re facing. You can also post your own tips and respond to fellow learners’ questions. Cognite Academy’s instructors are also here to help.

59 replies

Practitioner ⭐️⭐️⭐️
March 7, 2023

Hi! I’m currently following the Extractor-utils Library for Cognite Python SDK course and encountered an error during the ‘Main Function’ video. I ran the command ‘poetry run csv_extractor example_config.yaml’ as instructed, but got an error that no .env file was found to handle the variables in the example_config.yaml file (screenshot attached).

Two things to note that may be related: 

  1. When I followed the first video for starting a new project and ran the pip install cognite-extractor-manager command, I got errors that the pre-commit, black, and isort commands could not be found (screenshot attached), so I redid the steps and pip installed those 3 packages first before running installing the cogex manager and was then able to proceed with the cogex init process.
  2. I am using PyCharm but the video uses an older version, so it’s possible I may have settings incorrectly configured when I created the new project.

 

Thank you!

Active ⭐️⭐️⭐️
January 18, 2024

Hi @Miguel Rosado and @Toye ,

Are you still having problems creating assets? 

Hello!
As Toye mentioned a couple of days ago, that is correct.
WHen Creating an asset, it would show the same permissions error. If i am to guess, this probably applies to creating any kind of item from the SDK (Since the same happened with data sets)
Here are the screenshots after running my code

The error reads:

CogniteAPIError: Resource not found. This may also be due to insufficient access rights. | code: 403 | X-Request-ID: ec318c97-4c11-94e3-b268-1522f4c88b22The API Failed to process some items.Successful (2xx): []Unknown (5xx): []Failed (4xx): ['worldMRosado_dataset']

 

I have run into this problem today. any update on how to fix it?

Sofie Haug
Expert ⭐️⭐️⭐️⭐️
Cognite Academy Instructor
January 19, 2024

Hi @sunnyfufu! Can you send me a link to the course you are doing and which step you get this message?

 

 

Sofie | Cognite Academy
Committed ⭐️⭐️⭐️
December 20, 2024

Hi I’m new at python and I’m realizing that I’m a little bit lost with this course right now. 

Is there something to understand better what I need to do correctly maybe it’s because there’s to many ways to do the same thing but presently not sure what I need to do exactly.  I don’t have poetry install but have Visual Studio 2022.  I was able to download a copy of the repository to my pc locally and it’s showing in my visual studio.

Now I think I should be trying to do a authentification to connect to the Cognite Data Fusion.

But that’s where I’m starting to get lost.  it says in the readme.md :Use the Authentication script file `utils/auth.py` in this repo…. but in the repo it’s cognite_auth.py under the utils, which I think it’s the same but I’m really peaky at details when I’m not to much familiarize with something.

 

Also I’m confused with what Jupity’s notebook…...

 

How do I connect to execute the first thing like authentification….

Thank you for helping me out as a beginner in the python sdk world !

Steve

 

Active ⭐️⭐️⭐️
December 28, 2024

I installed the latest version of python (3.13.1) but when trying to run the command for poetry install I get the error Unable to find installation candidates for pywin32 (306) . After searching, I managed to find that it is because there is no suitable distribution of that version of pywin32 for my python version. Which version should I use?

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
January 2, 2025

@SteveDelVecchio The following Academy courses and microlearnings might help you to get a better understanding about the Python SDK and the Jupitor notebook. If you have further questions, please create a seprate topic so we can further assist you.

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
January 2, 2025

@Romulo Barbosa Ribeiro Try to install Python 3.12.x (or an earlier version) that pywin32 officially supports. You can check the PyPI page for pywin32 to find the latest supported Python versions.

Active ⭐️⭐️⭐️
January 13, 2025

I installed the latest version of python (3.13.1) but when trying to run the command for poetry install I get the error Unable to find installation candidates for pywin32 (306) . After searching, I managed to find that it is because there is no suitable distribution of that version of pywin32 for my python version. Which version should I use?

I'm now having issues with the pyzmq module. I was able to install further when downgrading from Python 3.13 to 3.12 but it is unable to install pyzmq.

Creating virtualenv using-cognite-python-sdk in C:\Users\abc.def\Documents\Projetos\Cognite\using-cognite-python-sdk\.venv
Installing dependencies from lock file

Package operations: 101 installs, 0 updates, 0 removals

- Installing six (1.16.0)
- Installing attrs (23.1.0)
- Installing platformdirs (3.2.0)
- Installing pyrsistent (0.19.3)
- Installing python-dateutil (2.8.2)
- Installing pywin32 (306)
- Installing traitlets (5.9.0)
- Installing arrow (1.2.3)
- Installing fastjsonschema (2.16.3)
- Installing jsonschema (4.17.3)
- Installing jupyter-core (5.3.0)
- Installing pycparser (2.21)
- Installing pyzmq (25.0.2): Failed

ChefBuildError

Backend subprocess exited when trying to invoke get_requires_for_build_wheel

C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\dist.py:270: UserWarning: Unknown distdefution option: 'cffi_modules'
warnings.warn(msg)
running egg_info
writing pyzmq.egg-info\PKG-INFO
writing dependency_links to pyzmq.egg-info\dependency_links.txt
writing requirements to pyzmq.egg-info\requires.txt
writing top-level names to pyzmq.egg-info\top_level.txt
running configure
Traceback (most recent call last):
File "C:\Users\abc.def\pipx\venvs\poetry\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 389, in
main()
File "C:\Users\abc.def\pipx\venvs\poetry\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc.def\pipx\venvs\poetry\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 1372, in
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands
dist.run_commands()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 983, in run_commands
self.run_command(cmd)
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\dist.py", line 999, in run_command
super().run_command(command)
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_command
cmd_obj.run()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 312, in run
self.find_sources()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 320, in find_sources
mm.run()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 543, in run
self.add_defaults()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 581, in add_defaults
sdist.add_defaults(self)
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\command\sdist.py", line 109, in add_defaults
super().add_defaults()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 239, in add_defaults
self._add_defaults_ext()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 323, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\cmd.py", line 124, in ensure_finalized
self.finalize_options()
File "", line 1111, in finalize_options
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\dist.py", line 999, in run_command
super().run_command(command)
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 1001, in run_command
cmd_obj.ensure_finalized()
File "C:\Users\abc~1.def\AppData\Local\Temp\tmp5wm2thjv\.venv\Lib\site-packages\setuptools\_distutils\cmd.py", line 124, in ensure_finalized
self.finalize_options()
File "", line 359, in finalize_options
File "C:\Users\abc~1.def\AppData\Local\Temp\tmpkr4ytwzi\pyzmq-25.0.2\buildutils\misc.py", line 71, in locate_vcredist_dir
vcvars = msvc.msvc14_get_vc_env(plat)
^^^^^^^^^^^^^^^^^^^^^^
AttdefuteError: module 'setuptools.msvc' has no attdefute 'msvc14_get_vc_env'


at ~\pipx\venvs\poetry\Lib\site-packages\poetry\installation\chef.py:164 in _prepare
160│
161│ error = ChefBuildError("\n\n".join(message_parts))
162│
163│ if error is not None:
→ 164│ raise error from None
165│
166│ return path
167│
168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pyzmq (25.0.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyzmq (==25.0.2)"'.

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
January 13, 2025

@Håkon V. Treider any idea regarding the issue that ​@Romulo Barbosa Ribeiro is observing?

Seasoned ⭐️
May 25, 2025

Hi,

I’m facing a permission issue when i try create asset in dataset that i’ve created during “Hands on” part of “Learn to Use the cognite Python SDK” course.

You can see the parameters for authentication Below:

 

 

I’ve received following error by run these code root_asset = Asset(name="world", description="Asset root of countries", data_set_id=ds_id)
client.assets.create(root_asset)

 

 

Can someone help me?