X-Plane / XPlane2Blender

Scenery & Aircraft export addon for Blender and X-Plane
GNU General Public License v3.0
190 stars 67 forks source link

Dataref could not be parsed #725

Open DevolperRL opened 1 year ago

DevolperRL commented 1 year ago

Hi, after I installed this version(4.2) and blender 3.2, I got this message: image Can someone help me please how to fix this? I would continue with my plane

luweejinator commented 1 year ago

it happened shortly after loading that test blend file of a wiper gradient bake example provided from the manual...

luweejinator commented 1 year ago

i fixed it by removing the xplane2blender version 4.2-3 from edit>preferences>addons in blender and then installing the io_xplane2blender_4_2_0-rc_2-117_20220419015723-v12.zip i can "parse datarefs" now...

luweejinator commented 1 year ago

i tried 4.2 rc 3 again.. this time i didnt uninstall 4.2 rc 2 and clicked install and selected the rc3 zip and it didnt break anything...

luweejinator commented 1 year ago

not sure what happened this time...

Python: Traceback (most recent call last): File "C:\Users\luijee\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\io_xplane2blender\xplane_ops.py", line 882, in execute bake_temp_folder.mkdir(parents=True, exist_ok=True) File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\pathlib.py", line 1173, in mkdir self._accessor.mkdir(self, mode) PermissionError: [WinError 5] Access is denied: '_tmp_bake_images'

luweejinator commented 1 year ago

closed blender... opened as administrator... error went away...

ygtshn commented 1 year ago

Hello guys, I am having the same exact problem on linux. Tried running blender as root but did not work. I am on blender 3.3.5 and xplane2blender 4.2.0. Tried multiple deleting/reinstalling actions but did not succeed. Could you help?

hltdev8642 commented 11 months ago

So I was able to resolve this by modifying the DataRefs.txt file.

Seems (at least for me) that the error is occuring due to lines that do not have exactly 4 tab-seperated values.

The way I fixed it, was by: 1) adding: [tab]???[tab]??? to any lines with less than 3 tabs. 2) removing extra tabs from lines with more than 3 tabs. (note: this mainly occurs on lines with DEPRECIATED or other items at the end of lines in all CAPS.) 3) to start, I replaced my DataRefs.txt file with the one located in the X-Plane folder. On doing this for some reason through process of elimination figured out that the following line single-handedly caused parsing to fail: sim/operation/misc/commandline byte[] n strings A consecutively packed series of null terminated C strings - read array size to find total length of all of them. Contains each separated command line argument (So you may want to find/replace and remove this line as well

I will attach my DataRefs.txt file so people are welcome to just use that and remove the need to troubleshoot, but for those who want to fix their own DataRefs.txt file I used the following command that counts the number of tabs per line:

awk '{print gsub(/\t/,"")}' DataRefs.txt  > output.txt

Basically you can run this and it outputs the number of tabs on each line to a text file, allowing you to see which lines are missing / have too many tabs on them. I used grep after personally: grep '4' --invert-match output.txt (this will result in all the lines that have more/less than the required number of tabs (4).

Hope this helps, works for me on the latest xplane2blender! I also don't mind helping if anyone is stuck/confused.

hltdev8642 commented 11 months ago

Here is the dataref file:

DataRefs.txt

For anyone who does not know where to put this for some reason, it replaces the DataRefs.txt file located at:

%APPDATA%\Blender Foundation\Blender\[BLENDER-VERSION]\scripts\addons\io_xplane2blender\resources\
bsupnik commented 8 months ago

@hltdev8642 this looks like a bug in the exporter's parser - we will investigate!

merlins8 commented 6 months ago

Here is the dataref file:

DataRefs.txt

For anyone who does not know where to put this for some reason, it replaces the DataRefs.txt file located at:

%APPDATA%\Blender Foundation\Blender\[BLENDER-VERSION]\scripts\addons\io_xplane2blender\resources\

didnt work

Arkan-Seng commented 4 months ago

Here is the dataref file: DataRefs.txt For anyone who does not know where to put this for some reason, it replaces the DataRefs.txt file located at:

%APPDATA%\Blender Foundation\Blender\[BLENDER-VERSION]\scripts\addons\io_xplane2blender\resources\

didnt work

Hello, it works perfectly, I've just tested it on Blender 4.0. I don't think you've placed the file in the right place. In my case it is here:

C:\Users[YOURACCOUNTNAME]\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_xplane2blender\resources