<?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>question Re: Correct python version for python extension in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388121#M246536</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110493"&gt;@AsifArmanRahman&lt;/a&gt; . I thought I read it somewhere as well but I cant remember nor I can find anything about this in the traditional guides online including release notes. I hope the owners do a better job documenting these things since it saves people a lot of headache and time.&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2024 14:02:32 GMT</pubDate>
    <dc:creator>SAMSAL</dc:creator>
    <dc:date>2024-05-20T14:02:32Z</dc:date>
    <item>
      <title>Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/387962#M246503</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyone knows if there is compatibility issue for using python exntension with the latest python version 3.12. To me the 3.12 doesnt seem to work well with the python extension and I keep getting the following error :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#993366"&gt;&lt;EM&gt;AttributeError: 'FileFinder' object has no attribute 'find_module'&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;EM&gt;2024-05-16 22:12:52,884 ERROR python.ExtensionManager Failed to load Python extensions from module file &amp;lt;Unknown Module File&amp;gt;. This module will be ignored.&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;EM&gt;Traceback (most recent call last):&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;EM&gt;File "F:\NIFI-PORD-ENV-2.0.0-M2\python\framework\ExtensionManager.py", line 186, in __discover_extensions_from_paths&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;&lt;EM&gt;module = finder.find_module(name)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The error seems to go away when using 3.11.*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 02:24:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/387962#M246503</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-05-17T02:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388119#M246534</link>
      <description>&lt;P&gt;I read somewhere that for now python version from 3.9 to 3.11 are supported. A version below or above causes error.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 12:52:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388119#M246534</guid>
      <dc:creator>AsifArmanRahman</dc:creator>
      <dc:date>2024-05-20T12:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388121#M246536</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110493"&gt;@AsifArmanRahman&lt;/a&gt; . I thought I read it somewhere as well but I cant remember nor I can find anything about this in the traditional guides online including release notes. I hope the owners do a better job documenting these things since it saves people a lot of headache and time.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 14:02:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388121#M246536</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-05-20T14:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388132#M246546</link>
      <description>&lt;P&gt;Ah I found it. In M1 guide it's mentioned python 3.9+, M2 guide it's mentioned 3.9 to 3.11 and 3.12 is not yet supported and finally in M3 guide 3.12 is supported as well. I'm just adding direct link of M3 guide for where it's mentioned below&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://nifi.apache.org/documentation/nifi-2.0.0-M3/html/python-developer-guide.html#requirements" target="_blank"&gt;NiFi Python Developer’s Guide (apache.org)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 23:11:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/388132#M246546</guid>
      <dc:creator>AsifArmanRahman</dc:creator>
      <dc:date>2024-05-20T23:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/390091#M247176</link>
      <description>&lt;P&gt;The error you are encountering is likely due to changes in the import system in Python 3.12. The `find_module` method was deprecated in Python 3.4 and removed in Python 3.12. The new import system uses `find_spec` instead.&lt;/P&gt;&lt;P&gt;To resolve this issue, you'll need to update the code to use `find_spec` instead of `find_module`. Here's how you can modify the relevant part of your code:&lt;/P&gt;&lt;P&gt;```python&lt;BR /&gt;Original code using find_module&lt;BR /&gt;module = finder.find_module(name)&lt;/P&gt;&lt;P&gt;Updated code using find_spec&lt;BR /&gt;module_spec = finder.find_spec(name)&lt;BR /&gt;if module_spec is not None:&lt;BR /&gt;module = importlib.util.module_from_spec(module_spec)&lt;BR /&gt;module_spec.loader.exec_module(module)&lt;BR /&gt;else:&lt;BR /&gt;module = None&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;You will need to import `importlib.util` if it's not already imported:&lt;/P&gt;&lt;P&gt;```python&lt;BR /&gt;import importlib.util&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;This change should make your code compatible with &lt;A href="https://iqratechnology.com/hire-python-developer/" target="_self"&gt;Python&lt;/A&gt; 3.12. If you are using a third-party library that hasn't been updated yet, you may need to wait for the maintainers to release a compatible version or consider contributing a patch.&lt;/P&gt;&lt;P&gt;Additionally, you might want to check if there are updates or patches available for the specific Python extension you are using, as the maintainers might have already addressed this issue in a newer release.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 13:34:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/390091#M247176</guid>
      <dc:creator>zain99</dc:creator>
      <dc:date>2024-07-10T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Correct python version for python extension</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/390093#M247178</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111530"&gt;@zain99&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Thanks for your information. it definitely shed more light on why 3.12&amp;nbsp; is not working&amp;nbsp; and how it need to be&amp;nbsp; resolved. This however appears to have been addressed in 2.0.0M4 release. I have not tested it against 3.12 but I can see in the code its no longer using the find_module and using the find_spec instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 13:52:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Correct-python-version-for-python-extension/m-p/390093#M247178</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-07-10T13:52:03Z</dc:date>
    </item>
  </channel>
</rss>

