pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.29k stars 331 forks source link

Error when accessing Settings #239

Closed DanBoghean closed 6 years ago

DanBoghean commented 7 years ago

I tried to access the settings and I get this error:

IronPython Traceback:
Traceback (most recent call last):
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 344, in 
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 55, in __init__
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 147, in _setup_addinfiles
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\pyrevitlib\pyrevit\loader\addin\addinfiles.py", line 98, in get_addinfiles_state
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\pyrevitlib\pyrevit\loader\addin\addinfiles.py", line 55, in _addin_def_exists
WindowsError: [Errno 22] [Errno 267] The directory name is invalid.

Script Executor Traceback:
System.ComponentModel.Win32Exception (0x80004005): WindowsError
 at IronPython.Modules.PythonNT.listdir(CodeContext context, String path)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite`1.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Runtime.Types.PythonType.FastTypeSite`1.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
 at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
 at PyRevitBaseClasses.ScriptExecutor.ExecuteScript(String sourcePath, String syspaths, String cmdName, String cmdUniqueName, Boolean forcedDebugMode, Boolean altScriptMode, Dictionary`2& resultDict)
DanBoghean commented 6 years ago

Any ideas on this?

eirannejad commented 6 years ago

@DanBoghean Sorry for the delay. Something is out of the ordinary about the %programdata%/Autodesk/Revit/Addin. pyRevit settings allows adding the addin manifest file to other installed revit versions and todo that it'll look into either %programdata% or %appdata% (depending on the This User Only / All Users installation. On your machine it is %programdata% since you have installed pyRevit with All Users option) and will list the subfolders (e.g. 2017, 2018, ...). It'll then use these paths to add the addin manifest file based on user selection in Settings window.

I looked into the code and the python os.listdir() is throwing an exception on the %programdata%/Autodesk/Revit/Addin/21XX.

Would you inspect to see if these directories exist and are not restricted to your machine user?

Update: Corrected Addin to Addins %programdata%/Autodesk/Revit/Addins/21XX.

DanBoghean commented 6 years ago

The directory does exist, but it is Addins rather than Addin, not sure if that is where the problem lies?

On Sun, Oct 8, 2017 at 12:51 AM, Ehsan Iran-Nejad notifications@github.com wrote:

@DanBoghean https://github.com/danboghean Sorry for the delay. Something is out of the ordinary about the %programdata%/Autodesk/Revit/ Addin. pyRevit settings allows adding the addin manifest file to other installed revit versions and todo that it'll look into either %programdata% or %appdata% (depending on the This User Only / All Users installation. On your machine it is %programdata% since you have installed pyRevit with All Users option) and will list the subfolders (e.g. 2017, 2018, ...). It'll then use these paths to add the addin manifest file based on user selection in Settings window.

I looked into the code and the python os.listdir() is throwing an exception on the %programdata%/Autodesk/Revit/Addin/21XX.

Would you inspect to see if these directories exist and are not restricted to your machine user?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eirannejad/pyRevit/issues/239#issuecomment-334987182, or mute the thread https://github.com/notifications/unsubscribe-auth/Aeikq73z8fklJXsL2SUVeFu1pZ21ZC1fks5sqHEHgaJpZM4Pn4nR .

eirannejad commented 6 years ago

No Sorry I mistyped it. Addins is correct.

Okay. I added a series of debug messages to help resolve this issue: https://github.com/eirannejad/pyRevit/commit/51ebc8c3cfca160e4ad55364ff058b32952f5bd2

Please update your pyRevit, then Hold CTRL and click on the Settings tool and copy the debug messages in your response.

DanBoghean commented 6 years ago

Thanks for the quick reply. Here is what it spit out:

DEBUG: [pyrevit.loader.basetypes] Dotnet SDK is not installed. | [Errno 2] [Errno 3] Could not find a part of the path 'C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETFramework'. 

DEBUG: [pyrevit.loader.basetypes] Interface types assembly file is: pyRevit_2017_a0da9866b35a7f29_PyRevitBaseClasses 

DEBUG: [pyrevit.userconfig] User config file: C:/Users/dboghean/AppData/Roaming/pyRevit/pyRevit_config.ini 

DEBUG: [scriptutils] Executing script: Settings @ C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Settings.pushbutton 

DEBUG: [scriptutils] Module Search Paths (sys.path): 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/pylib 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/pylib/site-packages 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/pyrevitlib 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/lib 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/pyrevitlib/pyrevit/loader/addin 

DEBUG: [scriptutils] C:/ProgramData/pyRevit/pyRevit-v4/pyRevit/pyrevitlib/pyrevit/loader/addin 

DEBUG: [pyrevit.loader.addin.addinfiles] Looking for addin manifest file in %programdata% 

DEBUG: [pyrevit.loader.addin.addinfiles] Finding base addins path under %programdata% 

DEBUG: [pyrevit.loader.addin.addinfiles] Revit base addin dir: C:/ProgramData/Autodesk/Revit/Addins 

DEBUG: [pyrevit.loader.addin.addinfiles] Revit addin path: C:/ProgramData/Autodesk/Revit/Addins/2017 

DEBUG: [pyrevit.loader.addin.addinfiles] Found: C:/ProgramData/Autodesk/Revit/Addins/2017/pyRevit.addin 

DEBUG: [pyrevit.loader.addin.addinfiles] Is pyRevit installed for All users? True 

DEBUG: [pyrevit.loader.addin.addinfiles] Getting addin manifest file states 

DEBUG: [pyrevit.loader.addin.addinfiles] Finding base addins path under %programdata% 

DEBUG: [pyrevit.loader.addin.addinfiles] Revit base addin dir: C:/ProgramData/Autodesk/Revit/Addins 

DEBUG: [pyrevit.loader.addin.addinfiles] Installed Revits: {'2017': 'C://ProgramData//Autodesk//Revit//Addins//2017', '2014': 'C://ProgramData//Autodesk//Revit//Addins//2014', '2018': 'C://ProgramData//Autodesk//Revit//Addins//2018', 'unins000.dat': 'C://ProgramData//Autodesk//Revit//Addins//unins000.dat', '2013': 'C://ProgramData//Autodesk//Revit//Addins//2013', '2012': 'C://ProgramData//Autodesk//Revit//Addins//2012', 'unins000.exe': 'C://ProgramData//Autodesk//Revit//Addins//unins000.exe', '2015': 'C://ProgramData//Autodesk//Revit//Addins//2015', 'Unifi': 'C://ProgramData//Autodesk//Revit//Addins//Unifi', '2016': 'C://ProgramData//Autodesk//Revit//Addins//2016'} 

DEBUG: [pyrevit.loader.addin.addinfiles] Looking for manifest file in: C:/ProgramData/Autodesk/Revit/Addins/2017 

DEBUG: [pyrevit.loader.addin.addinfiles] Error reading C:/ProgramData/Autodesk/Revit/Addins/2017/ExportViewSelectorAddin | System.IO.IOException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2017/ExportViewSelectorAddin' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2017/ExportViewSelectorAddin' is denied. 
 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
 at Microsoft.Scripting.PlatformAdaptationLayer.OpenInputFileStream(String path, FileMode mode, FileAccess access, FileShare share) 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 --- End of inner exception stack trace --- 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 at IronPython.Modules.Builtin.open(CodeContext context, String name, String mode, Int32 buffering) 
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) 
 at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) 

DEBUG: [pyrevit.loader.addin.addinfiles] Addin file exists for pyRevit: C:/ProgramData/Autodesk/Revit/Addins/2017/pyRevit.addin 

DEBUG: [pyrevit.loader.addin.addinfiles] Looking for manifest file in: C:/ProgramData/Autodesk/Revit/Addins/2014 

DEBUG: [pyrevit.loader.addin.addinfiles] Error reading C:/ProgramData/Autodesk/Revit/Addins/2014/CRUG Addin | System.IO.IOException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2014/CRUG Addin' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2014/CRUG Addin' is denied. 
 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
 at Microsoft.Scripting.PlatformAdaptationLayer.OpenInputFileStream(String path, FileMode mode, FileAccess access, FileShare share) 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 --- End of inner exception stack trace --- 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 at IronPython.Modules.Builtin.open(CodeContext context, String name, String mode, Int32 buffering) 
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) 
 at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) 

DEBUG: [pyrevit.loader.addin.addinfiles] Addin file exists for pyRevit: C:/ProgramData/Autodesk/Revit/Addins/2014/pyRevit.addin 

DEBUG: [pyrevit.loader.addin.addinfiles] Looking for manifest file in: C:/ProgramData/Autodesk/Revit/Addins/2018 

DEBUG: [pyrevit.loader.addin.addinfiles] Error reading C:/ProgramData/Autodesk/Revit/Addins/2018/ExportViewSelectorAddin | System.IO.IOException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2018/ExportViewSelectorAddin' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:/ProgramData/Autodesk/Revit/Addins/2018/ExportViewSelectorAddin' is denied. 
 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
 at Microsoft.Scripting.PlatformAdaptationLayer.OpenInputFileStream(String path, FileMode mode, FileAccess access, FileShare share) 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 --- End of inner exception stack trace --- 
 at IronPython.Runtime.PythonFile.__init__(CodeContext context, String name, String mode, Int32 buffering) 
 at IronPython.Modules.Builtin.open(CodeContext context, String name, String mode, Int32 buffering) 
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) 
 at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) 
 at lambda_method(Closure , Object[] , StrongBox`1[] , InterpretedFrame ) 

DEBUG: [pyrevit.loader.addin.addinfiles] Addin file exists for pyRevit: C:/ProgramData/Autodesk/Revit/Addins/2018/pyRevit.addin 

DEBUG: [pyrevit.loader.addin.addinfiles] Looking for manifest file in: C:/ProgramData/Autodesk/Revit/Addins/unins000.dat 

IronPython Traceback:
Traceback (most recent call last):
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 344, in 
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 55, in __init__
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.pushbutton\script.py", line 147, in _setup_addinfiles
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\pyrevitlib\pyrevit\loader\addin\addinfiles.py", line 116, in get_addinfiles_state
 File "C:\ProgramData\pyRevit\pyRevit-v4\pyRevit\pyrevitlib\pyrevit\loader\addin\addinfiles.py", line 61, in _addin_def_exists
WindowsError: [Errno 22] [Errno 267] The directory name is invalid.

Script Executor Traceback:
System.ComponentModel.Win32Exception (0x80004005): WindowsError
 at IronPython.Modules.PythonNT.listdir(CodeContext context, String path)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite`1.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Runtime.Types.PythonType.FastTypeSite`1.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
 at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
 at PyRevitBaseClasses.ScriptExecutor.ExecuteScript(String sourcePath, String syspaths, String cmdName, String cmdUniqueName, Boolean forcedDebugMode, Boolean altScriptMode, Dictionary`2& resultDict)
eirannejad commented 6 years ago

Okay killed the bug. Script was treating the C:/ProgramData/Autodesk/Revit/Addins/unins000.dat as a directory. I never expected a file to be directly under the addins folder so it got the better of me.

Resolved: https://github.com/eirannejad/pyRevit/commit/05e1a17fc2b9bf8129c0e32099c5c4bb2b0d1999

Thanks for reporting this. Please update, test and close the issue if it's resolved on your side.

DanBoghean commented 6 years ago

That did it!

Thanks so much for all your help!

eirannejad commented 6 years ago

Awesome. Another bug squashed.