<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: EF2: &amp;quot;Permission denied:&amp;quot; when deploying python extension on Windows ActiveGate in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261035#M5454</link>
    <description>&lt;P&gt;- I've faced the same issue when activating &lt;STRONG&gt;venv&lt;/STRONG&gt; while testing locally, and it worked well when I deactivated &lt;STRONG&gt;venv&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;- other thing, this may because of you've dependencies is already installed in your development environment but not included in setup.py under `install_requires` or `extra_requires` as the following figure&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MostafaHussein_0-1730239672205.png" style="width: 713px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24269i6BA89212AE71FD63/image-dimensions/713x246?v=v2" width="713" height="246" role="button" title="MostafaHussein_0-1730239672205.png" alt="MostafaHussein_0-1730239672205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- regarding &lt;STRONG&gt;__init__.py&lt;/STRONG&gt; it makes python treats the current directory as package and it was important for defining the namespace of the &lt;STRONG&gt;.py&lt;/STRONG&gt; files included in the same directory (before version 3.3) as the namespace of each class take the same name of the current directory of the &lt;STRONG&gt;__init__.py&lt;/STRONG&gt;, &lt;SPAN&gt;Since python version 3.3 it's automatically build namespaces and this file became optional.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 22:20:40 GMT</pubDate>
    <dc:creator>MostafaHussein</dc:creator>
    <dc:date>2024-10-29T22:20:40Z</dc:date>
    <item>
      <title>EF2: "Permission denied:" when deploying python extension on Windows ActiveGate</title>
      <link>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261032#M5453</link>
      <description>&lt;P&gt;I have developed an EF2 extension that has to be deployed on a Windows server. It is giving a "Permission denied:" error in the logs, when it is being deployed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2024-10-29 20:56:21.774 UTC [000018b8] warning [native] Failed to prepare extension environment:
 	id: f_7462894110209093396
 	datasource: python:3.10
 	time elapsed: 1.44s
 	command: "C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\python_venvs\custom_abc_0.0.2\Scripts\python.exe" -m pip install --no-warn-script-location --no-cache-dir --no-index -f C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\cache\custom_abc\0.0.2/lib abc
 	error: Traceback (most recent call last):
   File "C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\lib\runpy.py", line 196, in _run_module_as_main
     return _run_code(code, main_globals, None,
   File "C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\lib\runpy.py", line 86, in _run_code
     exec(code, run_globals)
   File "C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\lib\site-packages\pip\__main__.py", line 22, in &amp;lt;module&amp;gt;
     from pip._internal.cli.main import main as _main
   File "C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\lib\site-packages\pip\_internal\__init__.py", line 3, in &amp;lt;module&amp;gt;
     from pip._internal.utils import _log
   File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1027, in _find_and_load
   File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1006, in _find_and_load_unlocked
   File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 688, in _load_unlocked
   File "&amp;lt;frozen importlib._bootstrap_external&amp;gt;", line 879, in exec_module
   File "&amp;lt;frozen importlib._bootstrap_external&amp;gt;", line 1016, in get_code
   File "&amp;lt;frozen importlib._bootstrap_external&amp;gt;", line 1073, in get_data
 PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\dynatrace\\remotepluginmodule\\agent\\res\\dsruntime\\python3.10\\lib\\site-packages\\pip\\_internal\\utils\\__init__.py'
 
2024-10-29 20:56:21.774 UTC [000018b8] warning [native] std ouput from ""C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\bin\python.exe" -m venv C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\python_venvs\custom_abc_0.0.2 --system-site-packages --without-pip" command:
 
 std ouput from ""C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\python_venvs\custom_abc_0.0.2\Scripts\python.exe" -m pip install --no-warn-script-location --no-cache-dir --no-index -f C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\cache\custom_abc\0.0.2/lib abc" command:
 
2024-10-29 20:56:21.775 UTC [000018b8] info    [native] Rejected fastcheck for task f_7462894110209093396 - &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not a certificate issue, as another modified WMI extension is working OK in the server. It is the first python extension though.&lt;/P&gt;&lt;P&gt;Another interesting thing is that the __init__.py referenced is a 0 byte python file. It doesn't seem to have any permission issues though. The environment is a restricted environment, with no Internet connectivity.&lt;/P&gt;&lt;P&gt;Has anyone got any issue similar to this, developing custom extensions in Windows AGs?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 21:43:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261032#M5453</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-10-29T21:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: EF2: "Permission denied:" when deploying python extension on Windows ActiveGate</title>
      <link>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261035#M5454</link>
      <description>&lt;P&gt;- I've faced the same issue when activating &lt;STRONG&gt;venv&lt;/STRONG&gt; while testing locally, and it worked well when I deactivated &lt;STRONG&gt;venv&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;- other thing, this may because of you've dependencies is already installed in your development environment but not included in setup.py under `install_requires` or `extra_requires` as the following figure&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MostafaHussein_0-1730239672205.png" style="width: 713px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24269i6BA89212AE71FD63/image-dimensions/713x246?v=v2" width="713" height="246" role="button" title="MostafaHussein_0-1730239672205.png" alt="MostafaHussein_0-1730239672205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- regarding &lt;STRONG&gt;__init__.py&lt;/STRONG&gt; it makes python treats the current directory as package and it was important for defining the namespace of the &lt;STRONG&gt;.py&lt;/STRONG&gt; files included in the same directory (before version 3.3) as the namespace of each class take the same name of the current directory of the &lt;STRONG&gt;__init__.py&lt;/STRONG&gt;, &lt;SPAN&gt;Since python version 3.3 it's automatically build namespaces and this file became optional.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 22:20:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261035#M5454</guid>
      <dc:creator>MostafaHussein</dc:creator>
      <dc:date>2024-10-29T22:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: EF2: "Permission denied:" when deploying python extension on Windows ActiveGate</title>
      <link>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261138#M5458</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/66935"&gt;@MostafaHussein&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It doesn't seem to be related to my extension. It's complaining about the __init__.py file that comes inside pip, inside the python distributed with AG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\lib\site-packages\pip\_internal\utils\__init__.py&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime, I tried the trick of putting in a "#" in the file, so it isn't 0 bytes, but that didn't help either.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 22:55:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/EF2-quot-Permission-denied-quot-when-deploying-python-extension/m-p/261138#M5458</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-10-30T22:55:05Z</dc:date>
    </item>
  </channel>
</rss>

