Skip to Content.
Sympa Menu

cat-users - Re: [[cat-users]] Python scripts for eduroam configuration at Universität Leipzig

cat-users AT lists.geant.org

Subject: The mailing list for users of the eduroam Configuration Assistant Tool (CAT)

List archive

Re: [[cat-users]] Python scripts for eduroam configuration at Universität Leipzig


Chronological Thread  
  • From: Tomasz Wolniewicz <address@concealed>
  • To: Sophie Kunze <address@concealed>, address@concealed
  • Subject: Re: [[cat-users]] Python scripts for eduroam configuration at Universität Leipzig
  • Date: Tue, 8 Jan 2019 23:20:51 +0100

Hi,

  communicate returns a byte sequence for Python 3, therefore the decode is required, however it seems that we got the order wrong, the decode should go before the strip. Could you change the order and see if this will work for you? I have never seen the error you report, somehow the python on tested versions was more forgiving.

Yours

Tomasz Wolniewicz

W dniu 05.01.2019 o 13:39, Sophie Kunze pisze:

Hi,

I recently used the Python scripts supplied on cat.eduroam.org for "Universität Leipzig" to configure eduroam on my Arch Linux laptop.

Although they did work out in the end, I ran into errors on my first attempt of running the scripts. Both scripts use the Popen.communicate() method to receive data from subprocesses, for example in the following line:
output = out.strip().decode('utf-8')
Since strip() is used on the variable out, it is obvious that out is of string type. However, decode(...) should not be used on strings, only on byte objects. After I removed the .decode('utf-8') on all occurences of this construction in the file, it worked out without any further errors.

Best regards

Sophie Kunze

To unsubscribe, send this message: mailto:address@concealed?subject=unsubscribe%20cat-users
Or use the following link: https://lists.geant.org/sympa/sigrequest/cat-users
-- 
Tomasz Wolniewicz    
          address@concealed        http://www.home.umk.pl/~twoln

Uczelniane Centrum Informatyczne   Information&Communication Technology Centre
Uniwersytet Mikolaja Kopernika     Nicolaus Copernicus University,
pl. Rapackiego 1, Torun               pl. Rapackiego 1, Torun, Poland
tel: +48-56-611-2750     fax: +48-56-622-1850       tel kom.: +48-693-032-576



Archive powered by MHonArc 2.6.19+.

Top of Page