<?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: Does mitmproxy not work in python installed in JMP environment? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802215#M97835</link>
    <description>&lt;P&gt;Yes, I want to use this mitmproxy to replace Selenium for packet capture.&lt;BR /&gt;Maybe I have not set up the computer proxy server cause.And python is written by GPT-4o.&lt;BR /&gt;I'll check first.&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 07:11:07 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2024-09-27T07:11:07Z</dc:date>
    <item>
      <title>Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/800960#M97652</link>
      <description>&lt;P&gt;I checked with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jmputils.jpip('list')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;mitmproxy was successfully installed&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-09-21_09-22-03.png" style="width: 236px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68500i4240A5ED463DF7D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-09-21_09-22-03.png" alt="2024-09-21_09-22-03.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work in python code.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2024 01:23:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/800960#M97652</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-21T01:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802096#M97806</link>
      <description>&lt;P&gt;Doesn't work in what way? &amp;nbsp;Does import mitmproxy fail? If so try restarting JMP and seeing if it's now visible to JMP. &amp;nbsp;Otherwise how about an example? &amp;nbsp; What have you tried and why doesn't it do what you are expecting?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 16:45:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802096#M97806</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-09-26T16:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802146#M97819</link>
      <description>&lt;P&gt;Note to all: The package mitmproxy is a Man-In-the-Middle HTTPS/TLS web proxy for intercepting web traffic. &amp;nbsp;I'm assuming the use case here is separately launched mitmproxy and use of JMP and mitmproxy's Python-API to control the proxy from JMP.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 20:04:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802146#M97819</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-09-26T20:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802215#M97835</link>
      <description>&lt;P&gt;Yes, I want to use this mitmproxy to replace Selenium for packet capture.&lt;BR /&gt;Maybe I have not set up the computer proxy server cause.And python is written by GPT-4o.&lt;BR /&gt;I'll check first.&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 07:11:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802215#M97835</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-27T07:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802216#M97836</link>
      <description>&lt;P&gt;But the following PY code will work fine for other people using python in a non-JMP environment.&lt;BR /&gt;But I've never been successful running python in a JMP environment.Attempts to install different versions of these libraries also failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\__init__.py:71: UserWarning: Apply externally defined coinit_flags: 2
  warnings.warn("Apply externally defined coinit_flags: {0}"

Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\__init__.py", line 89, in &amp;lt;module&amp;gt;
    from . import findwindows
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\findwindows.py", line 42, in &amp;lt;module&amp;gt;
    from . import controls
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\controls\__init__.py", line 36, in &amp;lt;module&amp;gt;
    from . import uiawrapper # register "uia" back-end (at the end of uiawrapper module)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\controls\uiawrapper.py", line 47, in &amp;lt;module&amp;gt;
    from ..uia_defines import IUIA
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\uia_defines.py", line 181, in &amp;lt;module&amp;gt;
    pattern_ids = _build_pattern_ids_dic()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\uia_defines.py", line 169, in _build_pattern_ids_dic
    if hasattr(IUIA().ui_automation_client, cls_name):
               ^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\uia_defines.py", line 50, in __call__
    cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\pywinauto\uia_defines.py", line 60, in __init__
    self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\comtypes\client\_generate.py", line 153, in GetModule
    return _create_friendly_module(tlib, modulename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\comtypes\client\_generate.py", line 218, in _create_friendly_module
    _invalidate_import_caches()
  File "C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\site-packages\comtypes\client\_generate.py", line 189, in _invalidate_import_caches
    importlib.invalidate_caches()
  File "importlib\__init__.py", line 70, in invalidate_caches
    finder.invalidate_caches()
  File "&amp;lt;frozen importlib._bootstrap_external&amp;gt;", line 1409, in invalidate_caches
TypeError: MetadataPathFinder.invalidate_caches() missing 1 required positional argument: 'cls'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;PY&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;from pywinauto.application import Application
from pywinauto import timings
import pandas as pd
import time
import datetime
import os
import psutil&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Sep 2024 07:13:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802216#M97836</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-27T07:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802218#M97837</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;There are specific python code files.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 07:16:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802218#M97837</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-27T07:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802303#M97855</link>
      <description>&lt;P&gt;&lt;EM&gt;Attempts to install different versions of these libraries also failed.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As has been mentioned a couple of times in some of the other Python discussion posts, there is an issue in JMP 18.0 installing some packages. If the install fails due to a _socket cannot be found error, this is a known issue. &amp;nbsp;It has been resolved in 18.1, but you need to do an uninstall of JMP 18.0 and a clean install of 18.1. The update / repair does not move the necessary files. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The workaround in 18.0 is to go to the JMP install directory create a DLLs\ directory, move all the .pyd into the DLLs directory and some dlls. These are: libcrypto, libssl, libffi, and sqlite3. &amp;nbsp;They have version numbers in the name. &amp;nbsp;Move these files to the DLLs directory as well. This should fix the failure to install due to the can't find _socket error. &amp;nbsp;pywinauto should install after that fix or by reinstalling using 18.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 13:55:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802303#M97855</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-09-27T13:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802338#M97861</link>
      <description>&lt;P&gt;I have tried this on my machine, and I successfully installed all the packages, and I also get the error message when attempting to run from JMP.&lt;/P&gt;
&lt;P&gt;TypeError: MetadataPathFinder.invalidate_caches() missing 1 required positional argument: 'cls'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Searching on that string indicates it's a coding error within the package.&amp;nbsp; I see the behavior, I can do the import from standalone Python, and the error from JMP.&amp;nbsp; But in this case it appears the environment because it's running from within embedded Python makes the package take a different code path.&amp;nbsp; You could submit a bug / issue to the project.&amp;nbsp; &lt;A href="https://github.com/pywinauto/pywinauto" target="_blank"&gt;GitHub - pywinauto/pywinauto: Windows GUI Automation with Python (based on text properties)&lt;/A&gt;&amp;nbsp;However, pywinauto appears to be an abandoned project.&amp;nbsp; No commits in 2+ years. Looking at the issue tracker there also appears to be issues with it running on Win 11.&amp;nbsp; One of my co-workers is working on a project that utilizes Window's UI Automation to add capabilities to our own testing suite.&amp;nbsp; However, there are significant issues even in C++ of calling the UI Automation from within the application you are automating.&amp;nbsp; This could be having an effect as well. It's unlikely the author(s) of pywinauto tested or tried running from within embedded Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry looks like running pywinauto from within JMP or any embedded Python instance is dead-end.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 16:11:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802338#M97861</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-09-27T16:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802424#M97878</link>
      <description>&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am jmp 18.1 for win10.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 23:13:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802424#M97878</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-27T23:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Does mitmproxy not work in python installed in JMP environment?</title>
      <link>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802475#M97892</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If I want to install python separately, how can I make its library use the original JMP environment python library?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;C:\Users\Administrator\AppData\Roaming\JMP\JMP\Python\Python311\Scripts
C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\venv\scripts&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Sep 2024 02:02:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Does-mitmproxy-not-work-in-python-installed-in-JMP-environment/m-p/802475#M97892</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-09-29T02:02:18Z</dc:date>
    </item>
  </channel>
</rss>

