You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the following provided obj file which works fine in XPlane is actually invalid, a line number or some output of the content or context which was invalid would be useful.
UnrecoverableParseERror line 64, xplane_imp_parser.py.
if not lines or not (lines[0] in {"A", "I"} and lines[1:3] == ["800", "OBJ"]):
logger.error(
".obj file must start with exactly the OBJ header. Check filetype and content"
)
raise UnrecoverableParserError
Wouldn't it be friendlier to raise the message instead of logging it? The logs do not show in the error report as you can see in the message. WOuld it not be better to raise InvalidHeaderError
Sometimes the files I am encountering have cr/lf quirks and have weird formatting like this
The obj attached to this issue is double spaced, but these double spaced items import into xplane just fine.
May I suggest you filter empty lines, like this:
def fixme(n1,n2):
out = []
afile = open(n1,"r")
ofile = open(n2,"w")
lines = afile.readlines()
print('read '+n1)
for line in lines:
line = line.strip(' ').strip('\n').strip('\r')
if line != '':
out.append(line)
return out
If the following provided obj file which works fine in XPlane is actually invalid, a line number or some output of the content or context which was invalid would be useful.
stormwindow.obj attached (zip)
stormwindow.zip
UnrecoverableParseERror line 64, xplane_imp_parser.py.
Wouldn't it be friendlier to raise the message instead of logging it? The logs do not show in the error report as you can see in the message. WOuld it not be better to raise InvalidHeaderError
Sometimes the files I am encountering have cr/lf quirks and have weird formatting like this
I
800
OBJ
TEXTURE miscobjects.png
POINT_COUNTS 385 0 0 960
VT -0.678609 0.351299 3.048667 -0.983369 -0.179792 -0.025709 0.275422 0.718949
VT -0.678740 0.348166 3.048664 -0.998706 0.043618 -0.026161 0.275422 0.718290
VT -0.675921 0.351276 2.946007 -0.985842 -0.164899 0.030391 0.260027 0.718944
The text was updated successfully, but these errors were encountered: