BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TrainEditor2 issues

2 posters

Go down

solved TrainEditor2 issues

Post by Delsin Thu Nov 21, 2019 8:24 pm

Whenever I try to import any train with train.dat, the program throws a "wrong header format" error.
Also, it saves absolute path when selecting bogie and car objects in the .te file, not relative to the train folder.

Build version is 1.7.40.688
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Sat Nov 23, 2019 10:42 am

Sorry for the inconvenience because there is no documentation.

First, TrainEditor2 cannot edit train.dat directly.
Follow the steps below to edit train.dat.
1. Select "File (F)".
2. Select "Import ...".
3. Specify the train.dat file path as the file name of the Train.dat section. You can specify it directly in the text box, drag and drop the file, or specify it in the file explorer from "Open ...".
4. Click “OK”.
5. train.dat is imported.

Next, the format that TrainEditor2 can edit directly is ".te". Follow the steps below to export from this format to train.dat.
1. Select "File (F)".
2. Select "Export ...".
3. Specify the file path for outputting train.dat in the file name of the Train.dat section.
4. Click “OK”.
5. train.dat is exported.

The ".te" format manages file paths as absolute paths. TrainEditor2 converts absolute paths to relative paths when exporting to other formats.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Sat Nov 23, 2019 4:33 pm

This error happens when I'm using the import function as you described Neutral

As for file paths - oh thanks, that makes sense now Laughing didn't test this enough, sorry.
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Sat Nov 23, 2019 4:36 pm

Oh, can you upload the train.dat file that causes the error?
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Sat Nov 23, 2019 6:12 pm

Turns out, it's an extensions.cfg that causes the error when added in the Import window.
Code:
[car0]
object = train/old/E230Tc-8000.csv
length = 20
axles = -6.7,6.7
   
   [bogie0]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie1]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car1]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie2]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie3]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car2]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie4]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie5]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car3]
object = train/old/E231M-1000_1500.csv
length = 20
axles = -6.7,6.7
   
   [bogie6]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie7]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car4]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie8]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie9]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car5]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie10]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie11]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car6]
object = train/old/E231M-1000_1500.csv
length = 20
axles = -6.7,6.7
   
   [bogie12]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie13]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car7]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie14]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie15]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car8]
object = train/E235-2000-T.animated
length = 20
axles = -6.7,6.7
   
   [bogie16]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie17]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1

[car9]
object = train/old/E231Tc-6000.csv
length = 20
axles = -6.7,6.7
   
   [bogie18]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1
   
   [bogie19]
   object = train/bogey/bogey.animated
   axles = -1.1,1.1



[coupler0]
distances = -0.05,0.05
[coupler1]
distances = -0.05,0.05
[coupler2]
distances = -0.05,0.05
[coupler3]
distances = -0.05,0.05
[coupler4]
distances = -0.05,0.05
[coupler5]
distances = -0.05,0.05
[coupler6]
distances = -0.05,0.05
[coupler7]
distances = -0.05,0.05
[coupler8]
distances = -0.05,0.05
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Sun Nov 24, 2019 9:52 am

Thank you. I confirmed it.

This problem seems to occur if the number of vehicles defined in extensions.cfg exceeds the number of vehicles currently created in TrainEditor2.

Also, an error will occur if a file that does not exist is specified in extensions.cfg.

I will work on solving these problems.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Sun Nov 24, 2019 10:44 am

I submitted a pull request.
https://github.com/leezer3/OpenBVE/pull/407

Please download and check the revised version from the link below.
https://drive.google.com/file/d/13lGegeCU7llMprJ5f62fA67qnIJ36d_6/view?usp=sharing

In my environment, the extensions.cfg that you attached can now be loaded successfully.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Tue Nov 26, 2019 12:25 am

I tested it and it still throws the same error with the same extensions.cfg. Maybe has something to do with file encoding or something else language-specific?

A bit unrelated, but big thanks for this tool, it's really convenient for editing all .xml files together. The only thing I'd like to see there though is more motor sound tracks Very Happy
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Tue Nov 26, 2019 1:49 am

Hmm, I wonder why.

First, let's check the procedure just in case.

1. Select "File (F)".
2. Select "Import ...".
3. Specify the extensions.cfg file path as the file name of the Extensions.cfg section.
4. Click “OK”.
5. extensions.cfg is imported.

TrainEditor2 issues Import10

I have confirmed that this procedure does not cause an error.
If the error still occurs after following this procedure, it may be due to character encoding, as you say.
In that case, please give me the file itself using the file attachment function of this forum.

My work has paid off  for you saying so.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Tue Nov 26, 2019 4:39 pm

Yes, I did exactly that.

The file: https://www.dropbox.com/s/wkziblcei7vbirh/extensions.cfg?dl=0
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Tue Nov 26, 2019 5:06 pm

Thank you. I tried and found no errors.
I got several warnings that the file doesn't exist.

TrainEditor2 issues Import11

Is the error you are getting "wrong header format" still?

If so, please post a screenshot of the error screen.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Tue Nov 26, 2019 8:19 pm

TrainEditor2 issues Te2rip10

The error keeps appearing in Russian regardless of the language selected, but it still means "wrong header format".
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Tue Nov 26, 2019 11:05 pm

Please try the version that can be downloaded from the link below.
https://drive.google.com/file/d/1Rxqh72amDh6qC3Yv7e9qnf8ARPQFeFsw/view?usp=sharing

This version fixes log messages and adds a function that outputs the log to a text file.

There is an "Output logs..." button on the status tab.

After creating an error, click on it to save the log file.

Then post the log file here.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Wed Nov 27, 2019 3:58 pm

Here it is
Code:
TrainEditor2 Log: 27.11.2019 18:57:11
Error: System.FormatException: Входная строка имела неверный формат. at    в System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
  в System.Double.Parse(String s)
  в System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:строка 39
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
  в System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\ExceptionServicesImpl.cs:строка 16
  в System.Reactive.Stubs.<>c.<.cctor>b__2_1(Exception ex) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Stubs.cs:строка 16
  в System.Reactive.AnonymousSafeObserver`1.OnError(Exception error) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\AnonymousSafeObserver.cs:строка 62
  в System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:строка 43
  в System.Reactive.Sink`1.ForwardOnNext(TTarget value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Sink.cs:строка 49
  в System.Reactive.Linq.ObservableImpl.Where`1.Predicate._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Where.cs:строка 54
  в System.Reactive.Subjects.Subject`1.OnNext(T value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Subjects\Subject.cs:строка 139
  в Reactive.Bindings.ReactiveProperty`1.SetValue(T value) в C:\Repos\runceel\ReactiveProperty\Source\ReactiveProperty.NETStandard\ReactiveProperty.cs:строка 397
  в Reactive.Bindings.ReactiveProperty`1.set_Value(T value) в C:\Repos\runceel\ReactiveProperty\Source\ReactiveProperty.NETStandard\ReactiveProperty.cs:строка 209
  в Reactive.Bindings.ReactiveProperty`1.<.ctor>b__50_0(T x) в C:\Repos\runceel\ReactiveProperty\Source\ReactiveProperty.NETStandard\ReactiveProperty.cs:строка 189
  в System.Reactive.AnonymousSafeObserver`1.OnNext(T value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\AnonymousSafeObserver.cs:строка 43
  в System.Reactive.Sink`1.ForwardOnNext(TTarget value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Sink.cs:строка 49
  в System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:строка 47
  в System.Reactive.IdentitySink`1.OnNext(T value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\IdentitySink.cs:строка 15
  в System.Reactive.IdentitySink`1.OnNext(T value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\IdentitySink.cs:строка 15
  в System.Reactive.Linq.ObservableImpl.Select`2.Selector._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:строка 47
  в System.Reactive.Sink`1.ForwardOnNext(TTarget value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Internal\Sink.cs:строка 49
  в System.Reactive.Linq.ObservableImpl.Where`1.Predicate._.OnNext(TSource value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Where.cs:строка 54
  в System.Reactive.Subjects.Subject`1.OnNext(T value) в D:\a\1\s\Rx.NET\Source\src\System.Reactive\Subjects\Subject.cs:строка 139
  в Reactive.Bindings.Extensions.INotifyPropertyChangedExtensions.<>c__DisplayClass0_1`1.<PropertyChangedAsObservable>b__3(Object sender, PropertyChangedEventArgs e) в C:\Repos\runceel\ReactiveProperty\Source\ReactiveProperty.NETStandard\Extensions\INotifyPropertyChangedExtensions.cs:строка 21
  в System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
  в Prism.Mvvm.BindableBase.OnPropertyChanged(PropertyChangedEventArgs args) в d:\a\1\s\Source\Prism\Mvvm\BindableBase.cs:строка 100
  в Prism.Mvvm.BindableBase.OnPropertyChanged(String propertyName) в d:\a\1\s\Source\Prism\Mvvm\BindableBase.cs:строка 90
  в Prism.Mvvm.BindableBase.SetProperty[T](T& storage, T value, String propertyName) в d:\a\1\s\Source\Prism\Mvvm\BindableBase.cs:строка 36
  в TrainEditor2.Models.Trains.Car.set_RearAxle(Double value) в C:\Users\Administrator\Desktop\BVE\OpenBVE\source\TrainEditor2\Models\Trains\Car.cs:строка 198
  в TrainEditor2.IO.Trains.ExtensionsCfg.ExtensionsCfg.Parse(String fileName, Train train) в C:\Users\Administrator\Desktop\BVE\OpenBVE\source\TrainEditor2\IO\Trains\ExtensionsCfg\Parser.cs:строка 211
  в TrainEditor2.Models.App.ImportFiles() в C:\Users\Administrator\Desktop\BVE\OpenBVE\source\TrainEditor2\Models\App.cs:строка 630
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Wed Nov 27, 2019 7:34 pm

Thanks.

As far as this error is concerned, it looks like an error in Russian.

Changing the Windows language setting from Russian to English may work correctly.

I need to investigate a little more.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Thu Nov 28, 2019 9:52 am

When I changed the format to Russian on the Japanese version of Windows 7, the same error occurred.

The error disappeared when I switched the setting to English.

As a result, this error is obviously a language problem.

I will do further research.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Thu Nov 28, 2019 10:47 am

Please try the version that can be downloaded from the link below.
https://drive.google.com/file/d/1SVji9lvsownBSHSSxBbkAbP-IXxQ03BT/view?usp=sharing
https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2019-11-28.zip

I did not get an error when I changed the Windows language setting to Russian in this version.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Delsin Fri Nov 29, 2019 7:49 pm

Thanks a lot, it works fine now Wink
Delsin
Delsin

Posts : 294
Join date : 2016-08-20

Back to top Go down

solved Re: TrainEditor2 issues

Post by S520 Fri Nov 29, 2019 7:54 pm

Glad it worked out.

Administrator or moderator, please mark this topic as resolved.

-- Done, Quork
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

solved Re: TrainEditor2 issues

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum