List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous abonner à la newsletter :
abonner à la newsletter 


[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
> https://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