Fix #104510: X3D & BVH import error with Python 3.11

Remove unsupported 'rU' for file writing.
This commit is contained in:
Campbell Barton
2023-04-06 19:06:56 +10:00
committed by Thomas Dinges
parent d4d32b3731
commit 8038d3c3b0
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ def sorted_nodes(bvh_nodes):
def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
# File loading stuff
# Open the file for importing
file = open(file_path, 'rU')
file = open(file_path, 'r')
# Separate into a list of lists, each line a list of words.
file_lines = file.readlines()

View File

@ -1256,7 +1256,7 @@ def gzipOpen(path):
if data is None:
try:
filehandle = open(path, 'rU', encoding='utf-8', errors='surrogateescape')
filehandle = open(path, 'r', encoding='utf-8', errors='surrogateescape')
data = filehandle.read()
filehandle.close()
except: