sassoftware / pyviyatools

Python command-line tools that call the SAS Viya REST APIs - for SAS administrators.
Apache License 2.0
38 stars 31 forks source link

errors='ignore' option with open file #193

Open AllanWTham opened 10 months ago

AllanWTham commented 10 months ago

Hi there,

In this code, createcaslibjson.py, there are few entries with the errors='ignore' option with the file open:

with open(jsonfile, mode = "r", errors='ignore') as file:

Is there a way to add in a check because most customers are still running Python 2.7.5 which doesn't support this option.

gerrynelson63 commented 10 months ago

@tomstarr Can you take a look at this and the others that relate to createcaslbjson.

tomstarr commented 9 months ago

Hi Allan, a version check and notice/warning message is something I'd be happy to look into when I return from leave. In the meantime, perhaps it'd be worth encouraging your customers to update their Python deployments, particularly since Python 2.7.5 went out-of-support/EOL on 01JAN2020 (https://devguide.python.org/versions/)