SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Mar 20, 2023 7:22 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Mar 20, 2017 2:10 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 273
Dear Team,

one morning, I tried to start OQ2014 and I got this error message and it would not start anymore:

Code:
---------------------------
Error
---------------------------
System.InvalidOperationException: There is an error in XML document (65, 3). ---> System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: Streamer, Streamers, Configuration. Line 65, position 3.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlReader.ReadElementString()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read2_StreamerPlugin(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read4_Configuration(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderConfiguration.Read5_Configuration()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
   at SmartQuant.Framework.biNi840a9j()
   at SmartQuant.Framework.YBFiUWDDI6(String  , FrameworkMode  , Boolean  , String  )
   at SmartQuant.Framework..ctor(String name, FrameworkMode mode, Boolean createServers, String fileServerPath)
   at OpenQuant.SplashScreen.Task_InitFramework()
   at SmartQuant.Shared.Startup.SplashScreen.worker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
---------------------------
OK   
---------------------------


I have tried to uninstall, deleted all data and reinstall, same error. Any idea what the reason might be?

Regards
Mike


Top
 Profile  
 
PostPosted: Tue Mar 21, 2017 10:15 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 583
Hello,
looks like the configuration file was corrupted.
You can try delete it(or all config files)

location of the folder:
%AppData%\SmartQuant Ltd\OpenQuant 2014\config


Top
 Profile  
 
PostPosted: Wed Mar 22, 2017 12:44 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 273
thx. deleted all config files.

configuration.xml was corrupted.

it ended the file like this:
Code:
   ......
    </Streamer>
    <Streamer>
      <TypeName>SmartQuant.BarStreamer, SmartQuant, Version=1.2.0.0, Culture=neutral, PublicKeyToken=023ca4f8a69375d5</TypeName>


so it did not close the Streamer and Streamers for sure.

Regards
Mike


Top
 Profile  
 
PostPosted: Wed Mar 22, 2017 3:25 pm 
Offline

Joined: Tue Oct 13, 2009 12:19 pm
Posts: 273
since OQ does not generate backup files by itself, this could help you to generate backup files and delete old files after x days:
I put this into my realtime scenario code...

Code:
//requirement: Install 7-zip from http://www.7-zip.org
         string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);   
         string strCmdText= string.Format("a \"{1}" + @"\SmartQuant Ltd\Backup {0}.7z" + "\" \"{1}" + @"\SmartQuant Ltd\OpenQuant 2014\" + "\" -ssw",DateTime.Now.ToString("yyyy MM dd HHmm"),appData);
         //Console.WriteLine(strCmdText);
         System.Diagnostics.Process cmd = new System.Diagnostics.Process();
         cmd.StartInfo.FileName = @"C:\Program Files\7-Zip\7z.exe";
         cmd.StartInfo.RedirectStandardInput = true;
         cmd.StartInfo.RedirectStandardOutput = true;
         cmd.StartInfo.CreateNoWindow = false;
         cmd.StartInfo.UseShellExecute = false;
         cmd.StartInfo.Arguments = strCmdText;
         cmd.Start();
         Console.WriteLine(cmd.StandardOutput.ReadToEnd());
         
         var files = new System.IO.DirectoryInfo(appData + @"\SmartQuant Ltd\").GetFiles("*.7z");
         foreach (var file in files)
         {
            if (DateTime.UtcNow - file.CreationTimeUtc > TimeSpan.FromDays(10))
            {
               System.IO.File.Delete(file.FullName);
            }
         }


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group