DynamoDS / RevitTestFramework

Unit Testing on Revit
124 stars 81 forks source link

Program contains incorrect schema #1

Closed vinnividivicci closed 9 years ago

vinnividivicci commented 10 years ago

Hello and thanks for making this library open-source! It promises to help us create more reliable Revit Add-ins.

I have run into this issue: screenshot_060514_102349_am

This happens after installing the framework from the .exe in the RevitTestFramework\tools\Output folder and trying to run the SampleTests.dll.

I have verified that the empty.rfa file is in the correct year version for the version of Revit I am testing with, although I had to upgrade the empty.rfa and brick.rfa files that come with the source (they seemed to be in 2013 format), but it stills throw that error.

Also created brand-new versions of those files based off of the Metric Mass Family Template and it gives the same error.

Here is a screenshot of my settings: screenshot_060514_104125_am

The \2015 does contain the empty.rfa and bricks.rfa files so that's not the problem.

Thanks :smile:

vinnividivicci commented 10 years ago

@ikeough Update: The Samples are running fine when I compile the whole project from source... Maybe the build is just out of date?

ikeough commented 10 years ago

That could be. I don't have the installers set to build during the source build. I should do that :) Also, this hasn't been tested with 2015 yet. I will need to update shortly. That could be another cause of the schema error. Perhaps there is a small change to the journal format from 2014->2015.

vinnividivicci commented 10 years ago

@ikeough OK, just to clarify, the installer version was not working with ANY of the Revit versions.

ikeough commented 10 years ago

This was an issue with a file lock that was fixed (I think). Please try the installers again and let me know.

vinnividivicci commented 10 years ago

@ikeough I checked-out both master & the 2015 branch and in both cases did a clean re-install of the Test Framework. In both cases and not matter what tests I run it still gives me the same "Incorrect schema" error. I can open the two Revit files in Revit 2015 without an issue, but the tests just won't run...

vinnividivicci commented 10 years ago

@ikeough I've done some more digging on the issue and I have isolated what's happening. I noticed that:

  1. The path to the .rfa file in the compiled-from-source version had no spaces and no weird characters
  2. The version from the installer ends up with spaces and parentheses because it's installed in : C:\Program Files (x86)\Revit Test Framework\. I know it's not just the parentheses causing issues since I moved the entire "Revit Test Framework" directory out of "Program Files (x86)" and it was still causing the same error. It's not until I renamed the "Revit Test Framework" folder to "RevitTestFramework" that the installer version started working correctly like the compiled-from-source version.

So at this point I'm wondering if there is a way to escape the paths we are feeding into the journal file so that Revit reads them correctly... Thoughts?

vinnividivicci commented 10 years ago

@ikeough An update on this: After integrating the framework as part of my Revit Add-in project, I'm still getting a schema error when the path to the file in question contains spaces. Except now it reads slightly different: screenshot_071014_020256_pm

I've compared the journal file that RTF spits out vs the one Revit generates when I open the same file manually (with spaces in the path) and the only difference I can see is that the version Revit spits out splits the line that loads the file into two with the _ line ending and then puts the file path on the second line.

I would really like to get to the bottom of this issue but it seems like it's outside of the scope of the open source portion of this project... am I right?

EDIT: The Visual part of the error message must be referring to the first part of the string Visual Studio 2013 which is part of the path that is not working...

vinnividivicci commented 9 years ago

I'm still getting this error with the latest branch of 2015...

ikeough commented 9 years ago

@vinnividivicci I just figured this out because I got the same. Apparently, Revit journal files don't like it if the path to your .rvt file has spaces in it. It chops the path name at the first space and tries to open that as a Revit file. Unfortunately, I can't really control this. It's part of the journal framework. For now, you'll have to specify Revit files that are in a directory with no spaces in the name.