mirror of
https://github.com/blender/blender-addons.git
synced 2025-07-21 23:46:24 +00:00
Fix #104510: X3D & BVH import error with Python 3.11
Remove unsupported 'rU' for file writing.
This commit is contained in:

committed by
Thomas Dinges

parent
d4d32b3731
commit
8038d3c3b0
@ -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()
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user