Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataref could not be parsed #725

Open
DevolperRL opened this issue Mar 2, 2023 · 11 comments
Open

Dataref could not be parsed #725

DevolperRL opened this issue Mar 2, 2023 · 11 comments

Comments

@DevolperRL
Copy link

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
Copy link

luweejinator commented Mar 8, 2023

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

@luweejinator
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@ygtshn
Copy link

ygtshn commented Apr 20, 2023

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
Copy link

hltdev8642 commented Jun 9, 2023

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
Copy link

hltdev8642 commented Jun 9, 2023

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
Copy link
Collaborator

bsupnik commented Sep 8, 2023

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

@merlins8
Copy link

merlins8 commented Nov 4, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants