# Unable to build OneAgent extension demo plugin in Windows environment

**URL:** <https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414>\
**Category:** Extensions\
**Tags:** windows, oneagent, extensions\
**Created:** [September 1, 2022, 4:04pm UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414 "2022-09-01T16:04:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseafcampos](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@joseafcampos](https://community.dynatrace.com/u/joseafcampos)\
**Post date:** [September 1, 2022, 4:04pm UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414/1 "2022-09-01T16:04:26Z")

</div>

I have installed python version 3.8 from&nbsp;[Python Release Python 3.8.10 | Python.org](https://www.python.org/downloads/release/python-3810/)

I made all steps in this link [Develop your own Extensions — Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/oneagent-extensions/oneagent-extensions-hands-on) until the build step. When running build command I get this error:

C:\…\oneagent-demo-ext\examples\demo\_oneagent\_plugin\>plugin\_sdk build\_plugin --no\_upload  
Arguments=Namespace(deployment\_dir=None, no\_cert\_ver=False, no\_upload=True, plugin\_dir=‘C:\\…\\oneagent-demo-ext\\examples\\demo\_oneagent\_plugin’, server=None, token=None, token\_file=None, verbose=False)  
Starting oneagent\_build\_plugin  
Checking plugin metadata: C:\…\oneagent-demo-ext\examples\demo\_oneagent\_plugin\plugin.json  
Validating plugin.json against schema  
**Error occured: \<urlopen error [WinError 2] The system cannot find the file specified: ‘name.json’\>**

Any ideas of what is causing this error?

Thank you.

---

<div class="post-metadata">

**Author:** ![ben\_davidson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ben_davidson/32/20391_2.png) [@ben\_davidson](https://community.dynatrace.com/u/ben_davidson)\
**Post date:** [September 1, 2022, 9:54pm UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414/2 "2022-09-01T21:54:29Z")

</div>

Depending on which version of the SDK you are using, you may see a Traceback message that references a problem in the [jsonschema](https://pypi.org/project/jsonschema/) package. This is a dependency of plugin\_sdk. There was a [change](https://github.com/python-jsonschema/jsonschema/issues/981) made in version 4.10.0 of jsonschema that seems to have broken several tools that depend on it.

 ![ben_davidson_0-1662069209544.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/e/1e927be3564310dea70e9274666fcfdb3a3e541c.png)

For now, the best course of action is downgrade your version of jsonschema to \<=4.9.1. Run the command:

```python
pip install jsonschema==4.9.1

```

After the downgrade is complete, try running the build command again. Here’s an example of the error, the downgrade and a rerun of the build command:

```c
FileNotFoundError: [Errno 2] No such file or directory: 'xxx/plugin_deployment/xxx/plugin.json'
❯ pip install jsonschema==4.9.1
Collecting jsonschema==4.9.1
  Using cached jsonschema-4.9.1-py3-none-any.whl (79 kB)
Requirement already satisfied: attrs>=17.4.0 in ./venv/lib/python3.11/site-packages (from jsonschema==4.9.1) (22.1.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in ./venv/lib/python3.11/site-packages (from jsonschema==4.9.1) (0.18.1)
Installing collected packages: jsonschema
  Attempting uninstall: jsonschema
    Found existing installation: jsonschema 4.10.0
    Uninstalling jsonschema-4.10.0:
      Successfully uninstalled jsonschema-4.10.0
Successfully installed jsonschema-4.9.1
❯ ./build_and_simulate.sh
File: /etc/init.d/dynatracefunctions not found - Remote Plugin Module is detected
Arguments=Namespace(plugin_dir='xxx/', deployment_dir='xxx/plugin_deployment', verbose=False, no_upload=True, no_cert_ver=False, server=None, token=None, token_file=None)
Starting oneagent_build_plugin
Checking plugin metadata: /Users/xxx/dev/xxx/plugin.json
Validating plugin.json against schema
Plugin data: Plugin name=xxx, version=0.1.1
Cleaning up previous build information

```

Hope that helps!

---

<div class="post-metadata">

**Author:** ![joseafcampos](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@joseafcampos](https://community.dynatrace.com/u/joseafcampos)\
**Post date:** [September 1, 2022, 11:04pm UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414/3 "2022-09-01T23:04:18Z")

</div>

Thank you for your answer.

I will try your solution, but in the meantime i made some progress.

As strange as it my seams, I’ve created an empty json file ‘name.json’ that was causing the exception. Then it threw another exception that it was missing a file name ‘units.json’. I also created this file, and finally it threw an exception that a file ‘properties.json’ was missing. I made a copy of ‘plugin.json’ and renamed it to ‘properties.json’.

After this changes i was able to run de simulator , build the extension and uploaded to Dynatrace compiled with the latest version of python 3.10.6.

---

<div class="post-metadata">

**Author:** ![joseafcampos](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@joseafcampos](https://community.dynatrace.com/u/joseafcampos)\
**Post date:** [September 2, 2022, 10:15am UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414/4 "2022-09-02T10:15:53Z")

</div>

Thank you.

I have applied your solution, downgraded the jsonschema and it worked.

---

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [September 29, 2022, 1:55pm UTC](https://community.dynatrace.com/t/unable-to-build-oneagent-extension-demo-plugin-in-windows-environment/36414/5 "2022-09-29T13:55:52Z")

</div>

Peoples : you saved me. Thanks.
