Pyrevit: Keynote manager - BIM 360

Created on 3 Feb 2021  Â·  18Comments  Â·  Source: eirannejad/pyRevit

Describe the bug
While using Keynote manager with a BIM 360 hosted txt file (a converted and non converted version), this error occurs :

keynote
'NoneType' object has no attribute 'Value' Creating keynote manager window

Path to the keynote file is :
BIM 360://Hub Name With special characters like é/0000_Project/Project Files/Architecture/0000_Keynotes.txt

If the same txt file is on a local directory, keynote manager works.

To Reproduce

  1. In Revit 2021, open a BIM 360 project.
  2. Annotate Tab, Keynote and set a new txt file on a BIM 360 via Autodesk Desktop Connector
  3. Refresh Keynote
  4. Open pyrevit's Keynote Manager
  5. Error occurs.

Expected behavior
Keynote manager opens.

Desktop (please complete the following information):

  • OS: Windows 10 (1909)
  • pyRevit Version 4.8.5 : 6f3e004
  • pyRevit Environment:
`==> Registered Clones (full git repos)
main | Branch: "master" | Version: "4.8.5:6f3e004" | Path: "C:\pyRevit\main"
==> Registered Clones (deployed from archive/image)
==> Attachments
main | Product: "2021.1" | Engine: IPY277 (277) | Path: "C:\pyRevit\main" | AllUsers
main | Product: "2020.2.1 (New Install)" | Engine: IPY277 (277) | Path: "C:\pyRevit\main" | AllUsers
main | Product: "2019.2.1" | Engine: IPY277 (277) | Path: "C:\pyRevit\main" | AllUsers
main | Product: "2018.3.3 Security Fix" | Engine: IPY277 (277) | Path: "C:\pyRevit\main" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\Users\olalancette\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2021.1 | Version: 21.1.0.108 | Build: 20200708_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
2020.2.1 (New Install) | Version: 20.2.12.1 | Build: 20200210_1400(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
2019.2.1 | Version: 19.2.10.7 | Build: 20190225_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019\"
2018.3.3 Security Fix | Version: 18.3.3.18 | Build: 20190510_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018\"
2017.2 | Version: 17.0.1117.0 | Build: 20170118_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2017\"
2016 Service Pack 1 | Version: 16.0.462.0 | Build: 20150506_1715(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2016\"
==> Running Revit Instances
PID: 22328 | 2021.1 | Version: 21.1.0.108 | Build: 20200708_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2021"
==> User Environment
Microsoft Windows 10 [Version 10.0.18363]
Executing User: RCAA\olalancette
Active User:
Admin Access: No
%APPDATA%: "C:\Users\olalancette\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v3.5 v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7 v4.X
Installed .Net-Core Target Packs: v2.1.500 v2.1.507
pyRevit CLI 4.8.5.0

Additional context
In this linked issue, they have a different error for an unconverted txt file : #795

Autodesk Desktop Connector Version 14.5.0.1144

All 18 comments

Would you be able to invite me to a test project on this hub so I can test? The hubs that I have don't have special chars

@eirannejad : You should receive an invitation.

@olalancette I'm really sorry I forgot to mention this. Would you mind using this email to invite me ehsan AT mcneel.com I don't have access to bim360 on my personal email. I was never able to get it to work. Thank you!!!

@eirannejad Done ✅

Thanks @olalancette I'm in. So far I'm not seeing any issues. Looking deeper now. Are you using French Revit or just plain English?

@eirannejad : I'm using French Revit. ("C:\Program Files\Autodesk\Revit 2021\Revit.exe" /language FRA)
I've tested with ENU Revit, and I still have the same issue.

Would you mind ALT+Click on the Keynote tool. Replace the script.py with this one. This should make Revit show a large crash report with better traceback

script.py.zip

There is the error :

IronPython Traceback:
Traceback (most recent call last):
 File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbutton\script.py", line 1332, in <module>
 File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbutton\script.py", line 336, in __init__
 File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbutton\script.py", line 584, in _determine_kfile
 File "C:\pyRevit\main\pyrevitlib\pyrevit\interop\adc.py", line 169, in sync_file
 File "C:\pyRevit\main\pyrevitlib\pyrevit\interop\adc.py", line 164, in is_synced
AttributeError: 'NoneType' object has no attribute 'Value'


Script Executor Traceback:
System.MissingMemberException: 'NoneType' object has no attribute 'Value'
 à Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 à IronPython.Compiler.Ast.DynamicGetMemberExpression.GetMemberInstruction.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 à Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 à IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 à Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 à IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 à Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 à IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2)
 à Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
 à IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite`2.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0, T1 arg1)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 à IronPython.Runtime.Types.PythonType.FastTypeSite`2.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0, T1 arg1)
 à System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 à Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 à IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
 à PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

Great. Now replace pyrevitlib/pyrevit/interop/adc.py with this

adc.py.zip

This should spit out some info into the output window

I have a strong hunch I know what the issue is. I'm looking at the file 'Status' property. I think on a Non-English Autodesk Desktop Connector, this actually has a different name :/

Seems to be the same error (without more info from output) :
```
IronPython Traceback:
Traceback (most recent call last):
File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbuttonscript.py", line 1332, in
File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbuttonscript.py", line 336, in __init__
File "C:\pyRevit\main\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Keynotes.pushbuttonscript.py", line 584, in _determine_kfile
File "C:\pyRevit\main\pyrevitlib\pyrevit\interop\adc.py", line 177, in sync_file
File "C:\pyRevit\main\pyrevitlib\pyrevit\interop\adc.py", line 172, in is_synced
AttributeError: 'NoneType' object has no attribute 'Value'

Script Executor Traceback:
System.MissingMemberException: 'NoneType' object has no attribute 'Value'
à Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.LightLambda.Run3T0,T1,T2,TRet
à System.Dynamic.UpdateDelegates.UpdateAndExecute2T0,T1,TRet
à IronPython.Compiler.Ast.DynamicGetMemberExpression.GetMemberInstruction.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.LightLambda.Run2T0,T1,TRet
à System.Dynamic.UpdateDelegates.UpdateAndExecute3T0,T1,T2,TRet
à Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) à IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) à Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.LightLambda.Run2T0,T1,TRet
à IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)
à System.Dynamic.UpdateDelegates.UpdateAndExecute2T0,T1,TRet
à Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) à IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) à Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.LightLambda.Run6T0,T1,T2,T3,T4,T5,TRet
à System.Dynamic.UpdateDelegates.UpdateAndExecute5T0,T1,T2,T3,T4,TRet
à IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite2.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0, T1 arg1) à System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) à IronPython.Runtime.Types.PythonType.FastTypeSite2.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0, T1 arg1)
à System.Dynamic.UpdateDelegates.UpdateAndExecute4T0,T1,T2,T3,TRet
à Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
à Microsoft.Scripting.Interpreter.LightLambda.Run2T0,T1,TRet
à IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
à PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)
```

Yeah but did you get an output window as well with some info?

When you browse into the BIM360 drive in your windows explorer, are the list headers in English? Trying to see if ADC is using a French translation for "Status". I changed my ADC to French and the actual "Synced" value is in French now

Screen Shot 2021-02-05 at 11 11 17 AM

Here is the translation: "État"
image

Yeah but did you get an output window as well with some info?

No output window. Only the error.

Ok. Found the bug. It's Status and Synced strings being in French. Let me work on a fix. Thanks a lot for reporting this!

Ok. Replace the keynote manager script and the adc with these two. This should fix the issue

Archive.zip

Hurray 🎊

Thanks a lot !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kuldeep3618x picture kuldeep3618x  Â·  4Comments

Robbo1234 picture Robbo1234  Â·  4Comments

DanBoghean picture DanBoghean  Â·  3Comments

jogilec picture jogilec  Â·  4Comments

pihglez picture pihglez  Â·  4Comments