[ALSB 3.0] ImportError: No module named wli

Hi all,
I've already posted a problem that I got moving my WLST scripts from ALSB 2.6 to 3.0.
As suggested in threadID=300006156 I changed some deprecated code.
The error is:
[java] Problem invoking WLST - Traceback (innermost last):
[java] File ".../EventBus/scripts/admin.py", line 2, in ?
[java] ImportError: No module named wli
and first lines of admin.py now are:
=====================
import wlstModule
from com.bea.wli.sb.management.configuration import SessionManagementMBean
from utils import createSessionName
from utils import loadProps
from utils import loadXML
=====================
Before running WLST from ant I run the related
./setDomainEnv.sh from my ALSB domain folder.
What could I check to solve that ?
Regards
ferp

I had a similar problem, but with a different file. The SessionManagementMBean class has moved to a new JAR file. You can find the new JAR file at <BEA_HOME>/alsb_3.0/lib/sb-kernel-api.jar
Once I corrected my classpath to include this jar file, my older scripts started working again.

Similar Messages

  • [OSB 10.3.1] ImportError: No module named wli

    Hi all,
    I'm migrating my WLST code from ALSB 3.0 to OSB 10.3.1 and I get some troubles. In order to understand where is the problem, I did:
    1) create basic.py as described in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/javadoc/com/bea/wli/sb/management/configuration/SessionManagementMBean.html
    2) set the classpath and environment variables correctly by invoking the setDomainEnv.cmd
    K:\EventBus\scripts>f:\software\developing\osb1031\domains\osb_cluster1\bin\setDomainEnv.cmd
    3) execute java weblogic.WLST basic.py
    K:\EventBus\scripts>java weblogic.WLST basic.py
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Problem invoking WLST - Traceback (innermost last):
    File "K:\EventBus\scripts\basic.py", line 2, in ?
    ImportError: No module named wli
    Could anyone please help me to solve that ?
    Regards
    ferp

    Thanks a lot! One step solved but another raises ...
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain ...
    Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
    For more help, use help(domainRuntime)
    Unexpected error: exceptions.AttributeError
    No stack trace available.
    Problem invoking WLST - Traceback (innermost last):
    File "C:\projects\osb1031\basic.py", line 16, in ?
    AttributeError: 'None' object has no attribute 'createSession'
    Where:
    import wlstModule
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.config import Ref
    try:
    connect("weblogic", "weblogic", "t3://localhost:7001")
    domainRuntime()
    sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
    sessionMBean.createSession("mysession") <- line 16
    So I imagine that findService returns a null object!
    regards
    ferp

  • ALSB ImportError: No module named customization

    Hi,
    I am getting this error
    ImportError: No module named customization
    Looks like it is not finding the package in the classpath.
    from com.bea.wli.config.customization import Customization
    bash-3.00$ echo $CLASSPATH
    /opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/java/lib/fscontext.jar:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/providerutil.jar::/usr/local/esb/bea/wlserver_10.0/server/lib/wlpatches/CR382420_1000mp1.jar:/usr/local/esb/bea/user_projects/domains/esbdomain/app_patches/*.jar::/usr/local/esb/bea/patch_wss110/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_wlw1020/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_wls1001/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_cie640/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/patch_alsb300/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/local/esb/bea/jdk150_11/lib/tools.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/weblogic_sp.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/weblogic.jar:/usr/local/esb/bea/modules/features/weblogic.server.modules_10.0.1.0.jar:/usr/local/esb/bea/modules/features/com.bea.cie.common-plugin.launch_2.1.2.0.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/webservices.jar:/usr/local/esb/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/usr/local/esb/bea/modules/net.sf.antcontrib_1.0b2.0/lib/ant-contrib.jar::/usr/local/esb/bea/wlserver_10.0/../modules/features/alsb.server.modules_3.0.0.0.jar:/usr/local/esb/bea/alsb_3.0/lib/flow/sb-flow.jar:/usr/local/esb/bea/wlserver_10.0/../modules/com.bea.core.jaxen_1.0.0.0_1-1-1.jar:/usr/local/esb/bea/wlserver_10.0/platform/lib/p13n/p13n_system.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/wlxbean.jar:/usr/local/esb/bea/alsb_3.0/lib/version.jar:/usr/local/esb/bea/alsb_3.0/lib/alsb.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-ant.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-common.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-core.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/lib/j2ssh-dameon.jar:/usr/local/esb/bea/alsb_3.0/3rdparty/classes:/usr/local/esb/bea/wlserver_10.0/../modules/com.bea.core.apache.commons.logging_1.1.0.jar::/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbembedded51.jar:/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbupgrade51.jar:/usr/local/esb/bea/wlserver_10.0/common/eval/pointbase/lib/pbclient51.jar:/usr/local/esb/bea/wlserver_10.0/server/lib/xqrl.jar:
    I see alsb.jar is in the classpath and unable to figure out why WLST is complaining about customization package.
    Does anyone know which alsb jar file contains this com.bea.wli.config.customization package ?
    Thanks --agr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    I am running into customization problem.
    For somereason, ALSBConfigurationMBean.customize() method expects two arguments while ALSB API needs only one argument http://edocs.bea.com/alsb/docs30/javadoc/com/bea/wli/sb/management/configuration/ALSBConfigurationMBean.html#customize(java.util.List).
    As you see in the script I am passing one List argument as expected by API above.
    Has anyone encountered this error. Anything wron on my script ?
    Here is the code I am using in my jython script.
    if custfile != None :
    print "************************************************************************************************************"
    print 'Loading customization file...', custfile
    print "************************************************************************************************************"
    input = FileInputStream(custfile)
    custlist = Customization.fromXML(input)
    filteredCustList = ArrayList()
    setRef = HashSet(createdRef)
    # apply a filter to all the customizations to narrow the target to the created resources
    for customization in custlist:
    print customization
    newcustomization = customization.clone(setRef)
    filteredCustList.add(newcustomization)
    print filteredCustList
    ALSBConfigurationMBean.customize(filteredCustList)
    sessionMBean.activateSession(sessionName, "import file completed");
    print
    print '-- DEPLOYMENT COMPLETE --'
    com.bea.wli.config.customization.EnvValueCustomization@1f9690e
    [email protected]d08
    com.bea.wli.config.customization.ReferenceCustomization@14c491b
    [com.bea.wli.config.customization.EnvValueCustomization@19726d9, [email protected]c2, com.bea.wli.config.customization.ReferenceCustomization@1a68065]
    Unexpected error: exceptions.TypeError
    No stack trace available.
    Problem invoking WLST - Traceback (innermost last):
    File "/usr/local/esb/sse/DeployALSBResources.py", line 198, in ?
    TypeError: customize(): expected 2 args; got 1
    Thanks --agr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ImportError: No module named com.bea.wli.sb.management.configuration

    Hi all,
    when i run the python script in python shell i am getting this error:
    Traceback (most recent call last):
    File "D:\osb_disable_service.py", line 2, in <module>
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    ImportError: No module named com.bea.wli.sb.management.configuration
    i have set the CLASSPATH to D:\bea\wlserver_10.3\server\lib\weblogic.jar
    i have set $CLASSPATH to D:\bea\osb_10.3\lib\sb-kernel-api.jar

    version: Oracle Service Bus 10gR3..
    the python script:
    from com.bea.wli.sb.management.configuration import SessionManagementMBean
    from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
    from com.bea.wli.config import Ref
    from java.lang import String
    from com.bea.wli.monitoring import StatisticType
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
    from java.lang import String
    from com.bea.wli.monitoring import StatisticType
    from com.bea.wli.config import Ref
    from com.bea.wli.sb.util import Refs
    from com.bea.wli.sb.management.configuration import CommonServiceConfigurationMBean
    admin_server="localhost"
    admin_server_poort="7001"
    wluser="weblogic"
    wlpassword="weblogic"
    domain="base_domain"
    project=raw_input("JMSResponseMessage" )
    service=raw_input("getResponse_proxyWsdl")
    action=raw_input("disable")
    connect(wluser, wlpassword, 't3://'+ admin_server + ':' + admin_server_poort)
    domainRuntime()
    # Create a session name
    #sessionName =
    sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
    print('… after session. Session is: ', sessionName)
    # Get the session MBean and create a session
    sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
    print('SessionMBean is: ', sessionMBean)
    sessionMBean.createSession(sessionName)
    print(String('Session was created … ').concat(sessionName))
    # Get the ProxyServiceConfigurationMBean specific to our session
    mbean = findService(String("ProxyServiceConfiguration.").concat(sessionName),'com.bea.wli.sb.management.configuration.ProxyServiceConfigurationMBean')
    # Creates a reference to a folder.
    # and ‘ProxyServices’ is a folder in the project
    #folderRef = Refs.makeParentRef(‘project/’)
    # and ‘ProxyServices’ is a folder in the project
    projectName = Refs.makeParentRef(project + '/')
    proxyRef = Refs.makeProxyRef(projectName, service)
    # do the action
    def setService():
    if action == 'disable':
    print "Disabling " + service
    mbean.disableService(proxyRef)
    else:
    print "Enabling " + service
    mbean.enableService(proxyRef)
    # or enable it
    setService()
    # Now commit (activate) the changes
    sessionMBean.activateSession(sessionName, "disabled PS")
    print (' has been completed')
    print
    disconnect()
    exit()
    WLST command: java weblogic.WLST filename

  • ImportError: no module named java  : While running a scenario (ODI 10.1.3.)

    Hi All,
    When i am running a scenario i am getting the below error in the 'error log ' file....Please let me know any pointers on the same.. its urgent:-
    =========================================================
    [oraodi@apo13100098 error]$ cat SIL_TIMEDIMENSION_CALCONFIG.30402.log
    12/15/11 10:26 AM :
    Session No-> 30402
    Package Name-> SIL_TIMEDIMENSION_CALCONFIG
    Step Name-> SIL_TimeDimension_CalConfig.MCAL_CONFIG_G
    Error Details->
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 2, in ?
    ImportError: no module named java
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)
    ===========================================================================================
    Cheers
    Manoj

    Hi Venkat,
    The error got resolved after adding '/usr/kerberos/bin:/usr/local/bin' to my PATH variable.
    cheers
    Manoj

  • [SOLVED] ImportError: No module named pygtk

    I have installed Dropbox from the AUR. Everything has gone well until I tried to start dropbox. It then says:
    Starting Dropbox...
    The Dropbox daemon is not installed!
    Run "dropbox start -i" to install the daemon"
    When I run "dropbox start -i", I get: (I actually run "dropbox-cli start -i," but before I installed dropbox-cli I was having the same problems with the dropbox command:)
    Starting Dropbox...Traceback (most recent call last):
    File "/usr/bin/dropbox-cli", line 1259, in start
         download()
    File "/usr/bin/dropbox-cli", line 280, in download
         import pygtk
    ImportError: No module named pygtk
    From what I've read, this is due to the program expecting python or python2, but  since I have python3 installed, then python links to python3. And pygtk doesn't exist in python3.
    This might or might not be the problem. Regardless, I cannot figure out how to fix this problem.
    Anyone know how to fix this? I really need to use DropBox.
    EDIT: I found an article describing what to install and in what order to fix this.
    Last edited by cobbmic (2015-02-17 19:05:32)

    Hello. Glad you fixed it.
    Please give us at least a link to the "article". For others who are interested in this.
    I quickly search beforehand but couldn't find a solution right away.
    Thanks!
    Edit: wording
    Last edited by rebootl (2015-02-17 22:07:31)

  • WLST : ImportError: no module named javaos

    Hi,
    I try to run wlst on a platform linux but at the time I launch wlst I obtain the following error: ImportError: no module named javaos
    my classpath contains wlst.jar,jython.jar, and weblogic.jar, tools.jar, rt.jar, etc.
    pythonpath, pythonhome are set to wlst install directory, and modules, scripts "py".
    thanks in advance.
    here the detail of the exception.
    /pdt/pdslpd1/p/8.1/jdk142_05/bin/java -Dwlst.debug.init=true -Duser.home=/pdt/pdc1pd0/p/mdw/bin/weblogic/ -Dpython.home=/pdt/pdslpd1/p/8.1/wlst/ -Dpython.path=/pdt/pdslpd1/p/8.1/wlst/ weblogic.WLST webloadmin.py
    Initializing WebLogic Scripting Tool (WLST) ...
    Setting the python home to /pdt/pdslpd1/p/8.1/wlst/
    Error executing wlstProfile.py
    Traceback (innermost last):
    File "/pdt/pdc1pd0/p/mdw/bin/weblogic/./wlstProfile.py", line 5, in ?
    ImportError: no module named javaos
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Traceback (innermost last):
    File "webloadmin.py", line 1, in ?
    ImportError: no module named re

    Hi,
    Another subject, Could you explain us how to use specific encoding (for example latin-1) to print european characters in stdout.
    I try to declare sys.setDefaultencoding('latin-1') in wlstProfile.py but it doesn't work fine.
    Thanks.

  • ImportError: no module named java

    One of our customers is using Windows XP SP 3 and they are running into below error when packages are run.
    It is happening at a specific step in IKM where Jython techonology is used. But this kind of issue never occured in dev/qa environments.
    Any hint is greatly appreciated.
    One more thing is customer is on 10.1.3.4, while delivered code was on 10.1.3.4.4 . Could that cause any issues?
    ==================================================================
    org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
    File "<string>", line 1, in ?
    ImportError: no module named java
    at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.g.y(g.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Thread.java:619)
    ==================================================================

    Hi,
    has anyone idea how to resolve this problem? I've error when I try to start Journal:
    org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
      File "<string>", line 1, in ?
    ImportError: no module named java
      at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
    at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
      at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
      at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
      at com.sunopsis.dwg.cmd.e.i(e.java)
      at com.sunopsis.dwg.cmd.g.y(g.java)
      at com.sunopsis.dwg.cmd.e.run(e.java)
      at java.lang.Thread.run(Unknown Source)
    Any idea what should I do ? JKM which I use is: JKM HSQL.
    Thanks for help.
    ===========================================
    EDIT:
    Solution for my problem was running Designer as Administrator. (Win 7).

  • ImportError: No module named rhpl.translate

    Hi,
    I am trying to setup RPM repository. The job seems to have failed at the last step.
    Step: DownloadAdvisories (Failed)
              Traceback (most recent call last):
    File "/<path>/emagent/gcagent/em_staging/dwldAdvisories.py", line 4, in <module>
    from up2date_client import rpcServer
    File "/usr/share/rhn/up2date_client/rpcServer.py", line 7, in <module>
    import config
    File "/usr/share/rhn/up2date_client/config.py", line 20, in <module>
    from rhpl.translate import _, N_
    ImportError: No module named rhpl.translate
    any idea, what could be the reason ?
    My OS is Linux 2.6.18-308.4.1.0.1.el5xen
    thanks
    Edited by: 826209 on Feb 13, 2013 2:32 PM

    Install rhpl package. 'yum install rhpl'

  • ImportError: No module named gtkhtml2

    I installed BlogTK (from the TUR repo) and can't get the program to run. When I run the program in terminal I get the following:
    $ BloGTK --help
    Traceback (most recent call last):
    File "/opt/gnome/bin/BloGTK", line 15, in ?
    import gtkhtml2
    ImportError: No module named gtkhtml2
    Any ideas on how to fix this? I'm not fimilar with Python and googling this error came up pretty weak and not very useful. Thanks in advance for any help.
    Jay

    it seems that the package may be missing a depend or may have been build on a system that had gtkhtml installed on it and that was autodetected when the TU built the package.
    contact the TU

  • ImportError: No module named cie

    Hi,
    In our test framework we have imported weblogic.management.scripting.utils.WLSTInterpreter.
    This was running fine untill now where we see the error : ImportError: No module named cie
    Is there something that we are missing?
    Thanks in advance,
    Nandini

    Hi,
    In our test framework we have imported weblogic.management.scripting.utils.WLSTInterpreter.
    This was running fine untill now where we see the error : ImportError: No module named cie
    Is there something that we are missing?
    Thanks in advance,
    Nandini

  • ImportError: No module named qt [SOLVED]

    I'm having a problem whereby qt cannot be found and all applications that use it fail to load.
    I have installed qt, qt3 and qt4 so, missing packages cannot be the issue.
    Issuing echo $QTDIR returns /opt/qt so the path is found, yet when I run any applications that depend on QT  I get: ImportError: No module named qt
    I noticed other threads with a similar problem but non of them have an answer that applies to me. Does anyone have any ideas? 
    I thought that posting here may be a better choice, since in a programming forum there should be people using python and if this is a known problem an answer will surely be at hand
    Thanks in advance.
    R.
    Last edited by ralvez (2008-03-15 17:14:32)

    @Shaika-Dzari,
    Thanks for your reply. Yes, I know that the "official" QT package is 4.
    I have two programs, one that I wrote and Kodos (a nice tool for RegEx testing/coding). Both started to fail with the same error a few weeks ago.
    Querying my system for info indicated that I have both QT3 and QT4 but in actual execution mode QT4 was not detected.
    I just did something a few minutes ago that got things back to work !! 
    pacman -Sy pyqt pyqt3
    After re-installing both of the packages things are back to normal ... interestingly enough, re-installing PyQT only, which given the error would seem the logical thing to do, did not solve the problem (??) I had to re-install both.
    Thanks again for posting.
    R.

  • [s] gnome-sh...sion-tool ImportError: No module named 'gi.repository

    After upgrading Gnome from 3.14 to 3.16 I had to reinstall my extensions, namely hide top bar. However when I went to run " gnome-shell-extension-tool -e hidetopbar-master" I get the following error:
    Traceback (most recent call last):
    File "/usr/bin/gnome-shell-extension-tool", line 20, in <module>
    from gi.repository import Gio
    ImportError: No module named 'gi.repository'
    I tried something simpler for the program to run, "--help", and the result was the same
    $ gnome-shell-extension-tool --help
    Traceback (most recent call last):
    File "/usr/bin/gnome-shell-extension-tool", line 20, in <module>
    from gi.repository import Gio
    ImportError: No module named 'gi.repository'
    Turns out that /usr/bin/gnome-shell-extension-tool is a python scrypt (so I can read the thing), and so I'm guessing the file gi.repository is simply missing so it can't use "Gio". I ran "# pacman -Qkq" to check to make sure that everything was inorder, and it is. I ran "pacman -Qo" to see which package owns gnome-shell-extension-tool (its gnome-shell as one might have guessed) and tried re-installing that. No luck. Next I tried running a search for gi.repository in hopes that it's somewhere the script can't find. Unfortunately, that didn't help either.
    I then looked at gnome-shell-extensions from a snapshot made before the upgrade and it too contains the line "from gi.repository import Gio", and I know I successfully installed this extension before in this manner since I've never been able to get Chromium or Firefox to install extensions for me. More over, the snapshot was searched as well.
    Any ideas?
    [edit=solution]
    hokasch wrote:
    $ pacman -Qo /usr/lib/python3.4/site-packages/gi/repository/
    /usr/lib/python3.4/site-packages/gi/repository/ is owned by python-gobject 3.16.0-1
    are you missing python-gobject?
    Last edited by nstgc (2015-04-12 17:12:26)

    hokasch wrote:
    $ pacman -Qo /usr/lib/python3.4/site-packages/gi/repository/
    /usr/lib/python3.4/site-packages/gi/repository/ is owned by python-gobject 3.16.0-1
    are you missing python-gobject?
    Thanks that worked, however it's not showing in gnome-shell-extension-prefs. Still, the problem is solved. Thank you.

  • Python setuptools gives 'ImportError: No module named version' error

    I am trying to install hdctools-git from AUR and it fails in install() with following error. This package was fine last time I installed it about 2 months ago. My gut feeling says the error comes either from recent python2-setuptools or python2 package update. But my python skills are not good enough to figure out how to solve the problem.
    Does anybody know what is going here?
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbgpio_unittests.py to bbgpio_unittests.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/gpio_interface.py to gpio_interface.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/uart.py to uart.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/client.py to client.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbuart_unittests.py to bbuart_unittests.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbadc.py to bbadc.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbmux_controller.py to bbmux_controller.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/system_config.py to system_config.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbgpio.py to bbgpio.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/ftdigpio.py to ftdigpio.pyc
    byte-compiling /home/anatol/tmp/pkgs/hdctools-git/pkg/hdctools-git/usr/lib/python2.7/site-packages/servo/bbi2c_unittests.py to bbi2c_unittests.pyc
    writing byte-compilation script '/tmp/tmp4TA67u.py'
    /usr/bin/python2 -O /tmp/tmp4TA67u.py
    removing /tmp/tmp4TA67u.py
    running install_egg_info
    running egg_info
    writing build/servo.egg-info/PKG-INFO
    writing top-level names to build/servo.egg-info/top_level.txt
    writing dependency_links to build/servo.egg-info/dependency_links.txt
    writing entry points to build/servo.egg-info/entry_points.txt
    Traceback (most recent call last):
      File "setup.py", line 28, in <module>
        'dut-control = servo.dut_control:main',
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 575, in run
        self.run_command(cmd_name)
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.py", line 33, in run
        self.run_command('egg_info')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 171, in run
        writer = ep.load(installer=installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2310, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
    ImportError: No module named version
    ==> ERROR: A failure occurred in package().
        Aborting...
    Last edited by anatolik (2015-01-18 06:39:16)

    I am getting the same problem. Uninstalling python2-daemon fixed it for me, as suggested here: http://stackoverflow.com/a/27996309/646735
    I have also logged an upstream issue here: https://bitbucket.org/pypa/setuptools/i … ed-version

  • ImportError: No module named libvirtmod

    After the last update I can't start anymore virt-manager
    $ virt-manager
    Traceback (most recent call last):
    File "/usr/share/virt-manager/virt-manager", line 36, in <module>
    from virtcli import cliutils, cliconfig
    File "/usr/share/virt-manager/virtcli/cliutils.py", line 29, in <module>
    import libvirt
    File "/usr/lib/python2.7/site-packages/libvirt.py", line 25, in <module>
    ImportError: No module named libvirtmod
    The file is also missing on the package file list : https://www.archlinux.org/packages/comm … irt/files/
    Any suggestion?
    Last edited by r0b0t (2013-12-04 13:46:03)

    I updated today and now virt-manager opens but shows no host and they just disappeared (everything) , while virsh shows the hosts. So I'm guessing that virt-manager doesn't connect to the right socket.
    In addition, every dialog fails badly with a traceback:
    Error launching host dialog: 'NoneType' object has no attribute '__getitem__'
    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/engine.py", line 568, in _do_show_host
    self._get_host_dialog(uri).show()
    File "/usr/share/virt-manager/virtManager/engine.py", line 555, in _get_host_dialog
    obj = vmmHost(con)
    File "/usr/share/virt-manager/virtManager/host.py", line 75, in __init__
    self.init_conn_state()
    File "/usr/share/virt-manager/virtManager/host.py", line 275, in init_conn_state
    memory = self.conn.pretty_host_memory_size()
    File "/usr/share/virt-manager/virtManager/connection.py", line 222, in pretty_host_memory_size
    return util.pretty_mem(self.host_memory_size())
    File "/usr/share/virt-manager/virtManager/connection.py", line 227, in host_memory_size
    return self.hostinfo[1] * 1024
    TypeError: 'NoneType' object has no attribute '__getitem__'
    and this socks badly, it "fixed" the old one and introduced another.

Maybe you are looking for