Author Topic: Attribute Error: 'QString' object has no attribute 'endswith' ...  (Read 5671 times)

0 Members and 1 Guest are viewing this topic.

Offline Dipankar Saha

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 516
  • Country: in
  • Reputation: 5
    • View Profile

Hi,
While saving a file (*.py) from "Script Generator"  ....we are getting an Attribute Error, saying  'QString' object has no attribute 'endswith'... How to avoid this?

Regards_
Dipankar

[NB:- We are using VNL-ATK 2015.RC1, .../ OS installed is RHEL 7.1]

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5383
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #1 on: September 15, 2015, 15:47 »
Known bug. Has something to do with the name of the directory you save it ... or not ... What is the name of
a) your project
b) the directory where you try to save
c) the name of the file you try to save?

Also, how EXACTLY did you arrive at this point (pretty much, exact mouse clicks, in particular how you decided in which directory to save the file, or where the configuration comes from, an NC file, or something you built in the Builder from scratch). If you can reproduce this, and let us know how, it will be very valuable information.

I think we know how to solve it (in a hacky way) but we're not quite sure why it happens...
« Last Edit: September 15, 2015, 15:49 by Anders Blom »

Offline Dipankar Saha

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 516
  • Country: in
  • Reputation: 5
    • View Profile
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #2 on: September 15, 2015, 18:58 »
Please find the attached file .......

« Last Edit: September 15, 2015, 19:49 by Dipankar Saha »

Offline Dipankar Saha

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 516
  • Country: in
  • Reputation: 5
    • View Profile
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #3 on: September 15, 2015, 19:34 »
Okay ...."how exactly did I arrive to this point" ...;  that's a bit peculiar .... !! For the last couple of releases (which were mostly diff. beta versions as well as the RC1 ......) we are finding the problem.....
_______________

Say,
at the Builder_Stash I fetch some optimized geometry.....so the object is some *.nc .....  Now if I send it to Script Generator, then by default the output file will be the same..../ Next, say I change the output file name to "A.nc" under some directory (like, /Desktop/ABC/A.nc) ...and try to close the Script Generator.../ In that case, no 'alert' is popping up (what it used to be...showing, "the document has been modified...do you want to save the changes....etc.")!! Rather, arbitrarily it is getting saved in some other location...e.g. /home/user1/.vnl/example_project* ..../ Sometimes, we used "save as" to bypass this hazard..../ Yet, as I was said earlier, it's very strange to see that...it works for some user, but at the same time does not work for somebody else who is on the same server...!!!

Best_
Dipankar

« Last Edit: September 15, 2015, 19:42 by Dipankar Saha »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5383
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #4 on: September 16, 2015, 00:01 »
I can recognize some of this from some of my own experience, and it's something we want to narrow down but as you mention it doesn't happen all the time.

However, it's extremely unlikely that you would
1) Send a structure from Builder to Scripter (using Send To)
2) Close the Script Generator and it doesn't warn
Please check this first, because I find it very hard to believe.

But to really fix the bug (or rather, understand it) what I need is a workflow
1. Take this file (and provide it!)
2. Drop this item to Builder
3. Click here
4. Send to Scripter
5. Click here (insert New calculator for instance)
6. Change output file to xxx by clicking button ...
7. Press save

and that this gives the "endswith" error. Else, it's like chasing a ghost...

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5383
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #5 on: September 16, 2015, 09:29 »
The issue is a bit more complex than that. We'll make sure it's fixed soon.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5383
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #6 on: September 16, 2015, 10:38 »
I can only repeat what I have said before about this issue. We cannot reproduce it, because it only happens in some very specific workflow. There is no way we can fix it without knowing what that workflow is, and it doesn't work to say generally "I click there and maybe type something here" - we basically need a video showing EXACTLY what you do, every single mouseclick... Sorry, but this is a tricky issue, and of course doesn't show up in 99.9% of all use cases, so it's something very specific in your workflow that triggers it. Perhaps the name of your project directory. Perhaps the name of the NC file. Perhaps your username.

Offline Dipankar Saha

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 516
  • Country: in
  • Reputation: 5
    • View Profile
Re: Attribute Error: 'QString' object has no attribute 'endswith' ...
« Reply #7 on: September 16, 2015, 15:43 »
Okay...for the sake of clarity...let us make a "collage" kind of thing with the various snap shots.... (Perhaps, that will show the exact details of every single mouse click....)

Regards_
Dipankar
« Last Edit: September 16, 2015, 15:46 by Dipankar Saha »