Author Topic: Python Error  (Read 8336 times)

0 Members and 1 Guest are viewing this topic.

Offline jkissane

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ie
  • Reputation: 0
    • View Profile
Python Error
« on: May 21, 2014, 16:55 »
We're seeing a user get the following problem when they try to launch the program, the splash screen appears briefly & then the text below. Not sure what the issue so any suggestions much appreciated, thanks!
Code
lnx0023ae7c8e25 (159) sh /local/QuantumWise/atk-13.8.1/vnl/bin/vnl
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Traceback (most recent call last):
  File "./zipdir/NL/GUI/Main/SplashScreen.py", line 94, in run
  File "./zipdir/NL/GUI/MainWindow/MainWindow.py", line 14, in <module>
  File "./zipdir/NL/GUI/Actions/ToolFactory.py", line 4, in <module>
  File "./zipdir/NL/GUI/Tools/CustomAnalyzer/CustomAnalyzer.py", line 37, in <module>
  File "./zipdir/NL/GUI/Tools/CustomAnalyzer/Analyzers/EffectiveMass.py", line 1, in <module>
  File "./zipdir/NanoLanguage.py", line 91, in <module>
  File "./zipdir/NL/Calculators/EMTCalculator/EMTCalculator.py", line 31, in <module>
  File "./build/vnl/lib/python2.7/site-packages/asap3/__init__.py", line 100, in <module>
ImportError: cannot import name view
lnx0023ae7c8e25 (160) 
Strangely it works fine for me when I run the same thing on the same PC (running Fedora 19).

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Error
« Reply #1 on: May 22, 2014, 11:15 »
Clearly you have some OpenGL problems. Try the suggestion printed in the error message and let us know the output. That is, run
Code
LIBGL_DEBUG=verbose /local/QuantumWise/atk-13.8.1/vnl/bin/vnl

Offline jkissane

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ie
  • Reputation: 0
    • View Profile
Re: Python Error
« Reply #2 on: May 22, 2014, 16:23 »
Thank you for the suggestion but as I mentioned it works fine for another two users (including me) on the same PC i.e.
Code
lnx0023ae7c8e25 (88) sh /local/QuantumWise/atk-13.8.1/vnl/bin/vnl
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.

Timing:                          Total     Per Step        %

--------------------------------------------------------------------------------

File IO, nlread         :       0.05 s       0.05 s       0.30% |=============|
--------------------------------------------------------------------------------
Total                   :      15.38 s
This is the fatal error I believe:
Code
ImportError: cannot import name view

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Error
« Reply #3 on: May 22, 2014, 16:31 »
No, the fatal error is "failed to load driver: i965". But that's not a part of ATK, it's part of your system. And to figure out why it fails, you need to first do

export LIBGL_DEBUG=verbose

before trying to start VNL.

Probably the user for which it fails has a different library setup or path, or something that prevents the OpenGL library from loading. Maybe a different window manager?

Offline jkissane

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ie
  • Reputation: 0
    • View Profile
Re: Python Error
« Reply #4 on: May 22, 2014, 17:04 »
No problem, I'm running both sessions from my own PC via an 'ssh -X' connection so everything is identical when it comes to window managers etc. We've also checked environment setting etc and they're the same. Can you tell me where those python files giving the error are located are & I'll try and debug it myself. I've run a find command but haven't been able to locate them. As I mentioned it starts ok for myself and another user with that same message about libGL so I'd respectfully suggest it isn't a fatal error. The person who purchased this license is out of the office so they'll be opening a support case when they get back but I'll like to figure out what the issue is myself if possible. Update: we got it to work by changing the user's home dir setting to a folder on the local hard disk on the PC before running the program i.e.
Code
setenv HOME /local/username
sh /local/QuantumWise/atk-13.8.1/vnl/bin/vnl
Can you tell me where the program stores its settings in their home directory as I suspect removing it will fix the problem permanently, thanks!
« Last Edit: May 22, 2014, 17:58 by jkissane »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Error
« Reply #5 on: May 22, 2014, 18:23 »
There are several things to comment on here - glad first of all you solved it. I'll read your answer carefully and get back.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Error
« Reply #6 on: May 23, 2014, 00:12 »
First and foremost: why do you run VNL over "ssh -X"? This will give extremely poor graphical performance. No matter where you have the license, you should always be able to run VNL locally on your machine, and instead of tunneling the graphical (big operation) just tunnel the license connection (small operation). This also makes the graphical requirements easier, since your laptop or desktop probably has a proper graphics card, which the cluster nodes might not.

The settings are not the same if "setenv HOME" makes a difference. So what is $HOME for the user that fails before you set it? It's unclear to me what "local" means here - the machine from which you ssh or the machine on which "vnl" is executed?

Also, why do you run "sh vnl"? It's an executable script, you should just run "vnl".

Offline jkissane

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: ie
  • Reputation: 0
    • View Profile
Re: Python Error
« Reply #7 on: May 23, 2014, 10:14 »
First and foremost: why do you run VNL over "ssh -X"? This will give extremely poor graphical performance. No matter where you have the license, you should always be able to run VNL locally on your machine, and instead of tunneling the graphical (big operation) just tunnel the license connection (small operation). This also makes the graphical requirements easier, since your laptop or desktop probably has a proper graphics card, which the cluster nodes might not.

Reason is that I was trying to figure out why it wouldn't work for the user on her PC hence I had two connections, one logged in as her, one logged in as me. I don't even know what the vnl program does so performance doesn't matter as I just quit it as soon as it starts successfully :)


The settings are not the same if "setenv HOME" makes a difference. So what is $HOME for the user that fails before you set it? It's unclear to me what "local" means here - the machine from which you ssh or the machine on which "vnl" is executed?

Also, why do you run "sh vnl"? It's an executable script, you should just run "vnl".


The normal setting for $HOME is the user's network home directory, setting it to /local/username just points it to a folder on the local drive on the PC which was empty so had none of the previous VNL setting stored in there. I just need to clean these out of her normal home directory so that it will start without the error about not being able to import whatever this is : "ImportError: cannot import name view"

No reason, it behaves exactly the same if run by typing /local/QuantumWise/atk-13.8.1/vnl/bin/vnl.

Can you let me know where it stores its settings so I can sanitize her home directory meaning she won't need this workaround.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Error
« Reply #8 on: May 23, 2014, 11:01 »
You can have a look in $HOME/.vnl, although I find it hard to imagine that's really the reason why it doesn't start. But in general yes, the user must have a writeable $HOME to start VNL.