gpsd-dev
[Top][All Lists]
Advanced

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

Re: [Git][gpsd/gpsd][master] gegps: Simplify open() fix.


From: Fred Wright
Subject: Re: [Git][gpsd/gpsd][master] gegps: Simplify open() fix.
Date: Tue, 12 Dec 2023 23:59:10 -0800 (PST)


On Tue, 12 Dec 2023, Gary E. Miller wrote:

Thatg's not gonna work.  Python 2.7 does not allow
open(,encoding=_'

+                with open(os.path.join(options.kmldir,
+                          'Realtime_GPS.kml'), 'w',
encoding="utf8")


From the Python 2.7 man page:

https://python.readthedocs.io/en/v2.7.2/library/functions.html#open

open() does not support encoding=

Here is the error:

# python2.7 buildtmp/clients/gegps -i  spidey
Traceback (most recent call last):
 File "buildtmp/clients/gegps", line 186, in <module>
   encoding="utf8") as f:
TypeError: 'encoding' is an invalid keyword argument for this function

Ah, it passed the syntax check but failed when called. That's what I get for using a cheap test. Sorry about that. Revert pushed.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]