Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2016


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Error


  • Subject: Re: [QF-Test] Error
  • From: "Ismael, Sarah" <Sarah_Ismael@?.com>
  • Date: Sun, 18 Dec 2016 14:35:14 +0000

Hi Greg,
                  It's working now. Thank you :)

-----Original Message-----
From: Gregor Schmid [mailto:Gregor.Schmid@?.de]
Sent: Thursday, December 15, 2016 10:44 PM
To: qftest-list@?.de
Cc: Ismael, Sarah
Subject: Re: [QF-Test] Error


Hello Sarah,

that's interesting. Apparently the os.getlogin method was dropped in Jython 2.7, which is the updated Jython version in QF-Test 4.1.

Fortunately you don't really need this method as it only retrieves the name of the current user which Java and QF-Test also provide. Simply replace the line

    Username = os.getlogin()

with

    Username = rc.lookup("system", "user.name")

Best regards,
    Greg


"Ismael, Sarah" <Sarah_Ismael@?.com> writes:

> Hello,
>
>                Hope this message finds you great! I've downloaded your latest version and I got this error:
>
> The script failed with the following message:
>
> Traceback (most recent call last):
>
>   File "<string>", line 1, in <module>
>
>   File "C:\Program Files
> (x86)\qfs\qftest\qftest-4.1.1\jython\Lib\qftest.py", line 91, in
> runscript
>
>     qfcommon.runscript(ctxt, code, exContext, dir)
>
>   File "C:\Program Files
> (x86)\qfs\qftest\qftest-4.1.1\jython\Lib\qfcommon.py", line 1028, in
> runscript
>
>     exec cpl in GlobalsWithFallback(globalDict, localDict), localDict
>
>   File "C:\Users\sismael.MGC\.qftest\_script4267154966540019891.py",
> line 14, in <module>
>
>     Username = os.getlogin()
>
> AttributeError: 'module' object has no attribute 'getlogin'
>
> I don't know the cause of it. Kindly advise
>
> Thanks,
>
> Sarah
>
> _______________________________________________
> qftest-list mailing list
> qftest-list@?.de
> http://archive.qfs.de/mailman/listinfo/qftest-list

--
Gregor Schmid

E: gregor.schmid@?.de
T: +49 8171 38648-11
F: +49 8171 38648-16

Quality First Software GmbH | www.qfs.de Tulpenstr. 41 | 82538 Geretsried | Germany GF Gregor Schmid, Dr. Martina Schmid, Karlheinz Kellerer HRB München 140833



Videos Downloads Documentation Buy Free Trial