No announcement yet.

How to fix DeprecationWarning from use of imp module?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to fix DeprecationWarning from use of imp module?

    I have installed a Python application using cPanels "Setup Python App" feature on a CloudLinux server. Python version is 3.8.1.

    I receive this warning message in the Passenger error.log file every time that a webpage in the app is visited:

    /opt/passenger-5.3.7-4.el6.cloudlinux/src/helper-scripts/ DeprecationWarning: the imp module is deprecated in favour of importlib; see the modules documentation for alternative uses
    import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
    Is there anything I can do to fix this and change imp to to importlib?

  • #2
    Hello Chris,
    To help you with this question we need a little bit more information, please create a ticket here and technical experts will help you asap.
    If you have any other questions, feel free to ask here.
    Thank you for contacting us.