pyrevitlabs / pyRevit

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

pyRevit addin does not load after installation of pyRevit 4.6.19 #579

Closed gdemol closed 5 years ago

gdemol commented 5 years ago

This morning I installed pyRevit 4.6.19 here: C:\Users\gmol\AppData\Roaming\pyRevit-Master

After that I started up Revit 2019, but pyRevit does not show up. What could be wrong or how can I load the addin manually?

Thanks in advance!

eirannejad commented 5 years ago

Did you read the template issue contents? Did you try using the pyrevit tool in command line?

gdemol commented 5 years ago

Yeah, i read the issues, there are similar issues, but I couldn't resolve the problem with it.

When I run pyrevit in command line I get more errors and a window that pyRevitManager 'doesn't work anymore': image

image

I also tested this on a different computer, same results. I also cleaned up evertything a few times (manually), but I can't get it to work.

I thought the problem could be resolved by manually pasting 'pyRevit.addin' to C:\ProgramData\Autodesk\Revit\Addins\2019

image

But after doing this I get this:

image

I hope that this is enough information :)

eirannejad commented 5 years ago

Hm. Seems like you are missing dependencies for whatever reason. Take a look at the C:\Users\gmol\AppData\Roaming\pyRevit-Master\bin directory and send me a screenshot of that please. Both issues are attributed to the Nlog logger module. This is the first time I'm seeing this. Check to see if the Nlog.dll in the bin directory is this version

2019-04-25 09_44_15-NLog dll Properties

LauraGong commented 5 years ago

I have the same issue and even though I installed v.4.6.19 this is my NLog version: Capture

I can't uninstall it, I've tried everything, deleting it inside regedit, repairing it, control panel, deleting it, nothing works, it's stuck inside my programs

clooz8 commented 5 years ago

I have the same NLog version as LauraGong, but I am able to uninstall it. Reinstalling did not help. I also tried uninstalling manually.

gdemol commented 5 years ago

Thanks for your fast reply!

For me the same Nlog-version as LauraGong and clooz8: image

And this is the content in the \bin directory: image image image

feait commented 5 years ago

Hi

Also having difficult installing. In our office, it is installing with no problems on Windows 10 machines, but not on Windows 7.

On Windows 7, it installs with no errors but when you open Revit, no script runs and pyRevit doesn't appear. I've tried running pyrevit in cmd prompt but it didn't make a difference.

I've tried following the youtube guide for manual install using GitKraken, but the install files shown in the video in pyRevit>release aren't there. Snap 2019-04-29 at 12 54 51

It looks like nothing is installing to the ProgramData>Autodesk>Revit>Addins folderfor any revit version (have 2017 and 2019 installed). Folders (pyRevit and pyRevit master) are appearing in AppData though. Not sure if all files are copying though as the contents differ to those on Windows 10. Maybe because the script isn't running on Revit open?

Any help appreciated.

It's an amazing plugin!

eirannejad commented 5 years ago

@LauraGong I'm sorry for the inconvenience this has cause. Most probably this is a dependency conflict with another add-on. The registry keys are under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. Run a search under this key for pyRevit and remove the entries.

eirannejad commented 5 years ago

@LauraGong and @clooz8 What Revit version and windows are you testing this on? if you can run the pyrevit env in command prompt and share the results.

eirannejad commented 5 years ago

@feait The gitkraken install video on youtube is quite old and talks about a much older pyRevit version. See Deployment page on pyRevit Blog

gdemol commented 5 years ago

@eirannejad I am sorry, but after removing the pyRevit entries under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and cleaning up my Add-ons, the same problem returns.

Somehow the Nlog version is still the same: image

feait commented 5 years ago

@eirannejad I thought as much!

Just can't get it to work on Windows 7 it seems. I ran the debug, hope it helps. Results below:

C:\Users\ivantomasevic>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.6.19" | Path: "C:
\Users\ivantomasevic\AppData\Roaming\pyRevit-Master"
==> Attachments
Error: Object reference not set to an instance of an object.
Run with "--debug" option to see debug messages

C:\Users\ivantomasevic>pyrevit env --debug
env = True
Debug: Active Keyword: env
==> Registered Clones (full git repos)
Debug: Try getting config as dict "environment:clones"
Debug: Try getting config "environment:clones" ?? {}
Debug: Checking pyRevit copy validity "C:\Users\ivantomasevic\AppData\Roaming\py
Revit-Master"
Debug: Valid pyRevit clone "C:\Users\ivantomasevic\AppData\Roaming\pyRevit-Maste
r"
Debug: Verified clone "master=C:\Users\ivantomasevic\AppData\Roaming\pyRevit-Mas
ter"
Debug: Updating config "environment:clones = {"master":"C:\\Users\\ivantomasevic
\\AppData\\Roaming\\pyRevit-Master"}"
Debug: Saving config file "C:\Users\ivantomasevic\AppData\Roaming\pyRevit\pyRevi
t_config.ini"
==> Registered Clones (deployed from archive)
Debug: Reading nogit clone parmeters from "C:\Users\ivantomasevic\AppData\Roamin
g\pyRevit-Master\.pyrevitargs"
Debug: Archive Path: ""
Debug: Branch: "master"
Debug: Deployment: "basepublic"
Debug: "core" : "["bin", "pyrevitlib", "site-packages", "pyRevitfile"]"
Debug: "corex" : "["bin", "extensions/pyRevitCore.extension", "pyrevitlib", "sit
e-packages", "pyRevitfile"]"
Debug: "base" : "["bin", "extensions/pyRevitCore.extension", "extensions/pyRevit
Tags.extension", "extensions/pyRevitTools.extension", "pyrevitlib", "site-packag
es", "pyRevitfile"]"
Debug: "basepublic" : "["bin", "extensions/pyRevitCore.extension", "extensions/p
yRevitTags.extension", "extensions/pyRevitTools.extension", "extensions/pyRevitT
utor.extension", "pyrevitlib", "site-packages", "pyRevitfile"]"
Debug: "basex" : "["bin", "extensions", "pyrevitlib", "site-packages", "pyRevitf
ile"]"
Debug: Reading nogit clone parmeters from "C:\Users\ivantomasevic\AppData\Roamin
g\pyRevit-Master\.pyrevitargs"
Debug: Archive Path: ""
Debug: Branch: "master"
Debug: Deployment: "basepublic"
Debug: Checking pyRevit copy validity "C:\Users\ivantomasevic\AppData\Roaming\py
Revit-Master"
Debug: Valid pyRevit clone "C:\Users\ivantomasevic\AppData\Roaming\pyRevit-Maste
r"
master | Deploy: "basepublic" | Branch: "master" | Version: "4.6.19" | Path: "C:
\Users\ivantomasevic\AppData\Roaming\pyRevit-Master"
==> Attachments
Debug: Analysing registered app: 4Projects PDF Printer (novaPDF 7.7 printer)
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk AutoCAD 2017 - English
Debug: Analysing registered app: Autodesk AutoCAD 2017 SP 1
Debug: Analysing registered app: Autodesk A360 Collaboration for Revit 2017
Debug: Analysing registered app: Autodesk A360 Collaboration v9 for Revit 2016
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk Collaboration for Revit 2019
Debug: Analysing registered app: Autodesk Navisworks 2014 64 bit Exporter Plug-i
ns
Debug: Analysing registered app: Autodesk Navisworks 2014 64 bit Exporter Plug-i
ns English Language Pack
Debug: Analysing registered app: Autodesk Navisworks Manage 2014
Debug: Analysing registered app: Autodesk Navisworks Manage 2014 English Languag
e Pack
Debug: Analysing registered app: Autodesk ReCap
Debug: Analysing registered app: Autodesk Revit 2017
Debug: Analysing registered app: Autodesk Revit 2017.2.4
Debug: Analysing registered app: Autodesk Revit 2017.0.3 Security Fix
Debug: Analysing registered app: Autodesk Revit 2017.2.3
Debug: Analysing registered app: Autodesk Revit 2019
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk Revit 2019.2
Debug: Analysing registered app: Autodesk Revit 2019.2.1
Debug: Analysing registered app: Autodesk Revit Architecture 2014 UR2
Debug: Analysing registered app: Autodesk Revit Architecture 2015
Debug: Analysing registered app: Autodesk Revit Architecture 2015 UR14
Debug: Analysing registered app: Autodesk Revit Architecture 2015 UR4
Debug: Analysing registered app: Autodesk Revit Architecture 2015 UR8
Debug: Analysing registered app: Autodesk Revit Architecture 2016
Debug: Analysing registered app: Autodesk Revit Architecture 2016 SP2
Debug: Analysing registered app: Autodesk Revit Architecture 2016.1.8
Debug: Analysing registered app: Autodesk Revit Architecture 2016 Update3
Debug: Analysing registered app: Autodesk Revit Architecture Content Libraries 2
015
Debug: Analysing registered app: Autodesk Revit Architecture Content Libraries 2
016
Debug: Analysing registered app: Autodesk Revit Content Libraries 2017
Debug: Analysing registered app: Autodesk Revit Content Libraries 2019
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk Revit Model Review 2019
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Batch Print for Autodesk Revit 2019
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk DWG TrueView 2015 - English
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: eTransmit for Autodesk Revit 2015
Debug: Analysing registered app: eTransmit for Autodesk Revit 2016
Debug: Analysing registered app: eTransmit for Autodesk Revit 2017
Debug: Analysing registered app: eTransmit for Autodesk Revit 2019
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Lumion 9.0.2
Debug: Analysing registered app: CINEMA 4D 14.042
Debug: Analysing registered app: Microsoft Visual J# 2.0 Redistributable Package
 - SE (x64)
Debug: Analysing registered app:
Debug: Analysing registered app: Mozilla Firefox 64.0 (x64 en-GB)
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Microsoft Office 365 Business - en-us
Debug: Analysing registered app: Personal Accelerator for Revit
Debug: Analysing registered app: Photomatix Pro version 4.2.6
Debug: Analysing registered app: Intel(R) Network Connections Drivers
Debug: Analysing registered app: Autodesk Revit 2017
Debug: Analysing registered app: Autodesk Revit 2019
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Autodesk Revit Content Libraries 2017
Debug: Analysing registered app: Autodesk Revit Content Libraries 2019
Debug: Analysing registered app:
Debug: Analysing registered app:
Debug: Analysing registered app: Skype for Business Basic 2016 - en-us
Debug: Analysing registered app: Logitech SetPoint 6.61
Debug: Analysing registered app: Symantec.cloud
Debug: Analysing registered app: Unlocker 1.9.2
Debug: Analysing registered app:
Debug: Analysing registered app: WinRAR 5.01 (64-bit)
Debug: Analysing registered app: Worksharing Monitor for Autodesk Revit 2019
Debug: Analysing registered app: PDFCreator
Debug: Analysing registered app: Microsoft Visual C++ 2005 Redistributable (x64)

Debug: Analysing registered app: Autodesk Navisworks Manage 2014 - 2010 DWG File
 Reader
Debug: Analysing registered app: Microsoft .NET Framework 4.7.2
Debug: Analysing registered app: Apple Application Support (64-bit)
Debug: Analysing registered app: Bonjour Print Services
Debug: Analysing registered app: Autodesk Workflows 2014
Debug: Analysing registered app: Adobe Photoshop Lightroom 5.7 64-bit
Debug: Analysing registered app: Autodesk Certificate Package  (x64) - 7.1.4
Debug: Analysing registered app: HyperPDF_Installer
Debug: Analysing registered app: Microsoft Visual C++ 2010  x64 Redistributable
- 10.0.40219
Debug: Analysing registered app: Union Square Working Files x64
Debug: Analysing registered app: Autodesk Navisworks Manage 2014
Debug: Analysing registered app: Autodesk Navisworks Manage 2014 English Languag
e Pack
Debug: Analysing registered app: Autodesk Workflows 2017
Debug: Analysing registered app: Intel(R) Rapid Storage Technology
Debug: Analysing registered app: AutoCAD 2017
Debug: Analysing registered app: ACAD Private
Debug: Analysing registered app: AutoCAD 2017 Language Pack - English
Debug: Analysing registered app: AutoCAD 2017 - English
Debug: Analysing registered app: ACA & MEP 2017 Object Enabler
Debug: Analysing registered app: Union Square Revit DLM Integrator x64
Debug: Analysing registered app: Microsoft .NET Core Host FX Resolver - 2.0.7 (x
64)
Debug: Analysing registered app: Microsoft Visual C++ 2017 x64 Additional Runtim
e - 14.12.25810
Debug: Analysing registered app: Union Square Revit DLM Integrator x64
Debug: Analysing registered app: Dynamo Core 1.2.1
Debug: Analysing registered app: HP ICC Profiles_x64
Debug: Analysing registered app: Autodesk ReCap
Debug: Analysing registered app: Autodesk ReCap Language Pack-English
Debug: Analysing registered app: Microsoft Visual C++ 2012 x64 Additional Runtim
e - 11.0.61030
Debug: Analysing registered app: Autodesk BIM 360 Revit 2015 Add-in 64 bit
Debug: Analysing registered app: Union Square Revit DLM Integrator x64
Debug: Analysing registered app: Intel(R) Rapid Storage Technology
Debug: Analysing registered app: Autodesk BIM 360 Revit 2016 Add-in 64 bit
Debug: Analysing registered app: eTransmit for Autodesk Revit 2015
Debug: Analysing registered app: eTransmit for Autodesk Revit 2016
Debug: Analysing registered app: eTransmit for Autodesk Revit 2017
Debug: Analysing registered app: eTransmit for Autodesk Revit 2019
Debug: Analysing registered app: Microsoft .NET Core Host - 2.0.7 (x64)
Debug: Analysing registered app: Autodesk Navisworks Manage 2014 - 2008 DWG File
 Reader
Debug: Analysing registered app: Union Square Working Files x64
Debug: Analysing registered app: iCloud
Debug: Analysing registered app: Microsoft Visual C++ 2008 Redistributable - x64
 9.0.30729.4148
Debug: Analysing registered app: Symantec.cloud - Endpoint Protection
Debug: Analysing registered app: Worksharing Monitor for Autodesk Revit 2019
Debug: Analysing registered app: Microsoft SQL Server 2014 Express LocalDB
Debug: Analysing registered app: Autodesk Workflows 2016
Debug: Analysing registered app: Autodesk 360
Debug: Analysing registered app: Bonjour
Debug: Analysing registered app: AutoCAD 2014 - English
Debug: Analysing registered app: AutoCAD 2014 Language Pack - English
Debug: Analysing registered app: AutoCAD 2014 - English
Debug: Analysing registered app: DWG TrueView 2015 - English
Debug: Analysing registered app: Microsoft .NET Core Runtime - 2.0.7 (x64)
Debug: Analysing registered app: FormIt Converter For Revit 2019
Debug: Analysing registered app: Microsoft Visual C++ 2008 Redistributable - x64
 9.0.30729.6161
Debug: Analysing registered app: RTV Xporter 2014
Debug: Analysing registered app: Dynamo Revit 1.3.4
Debug: Analysing registered app: FormIt 360 Converter For Revit 2017
Debug: Analysing registered app: Nitro Pro
Debug: Analysing registered app: Dynamo 0.7.1
Debug: Analysing registered app: Microsoft Visual C++ 2005 Redistributable (x64)

Debug: Analysing registered app: Microsoft Visual C++ 2005 Redistributable (x64)

Debug: Analysing registered app: Autodesk Revit Model Review 2019
Debug: Analysing registered app: Revit Architecture 2014
Debug: App is a Revit product: Revit Architecture 2014
Debug: Read version from registery key: "13.10.24211"
Debug: Read install path from registery key: "C:\Program Files\Autodesk\Revit Ar
chitecture 2014"
Debug: Read language code from registery key: "1033"
Debug: Could not determine Revit Product from version "13.10.24211"
Error: Object reference not set to an instance of an object. (System.NullReferen
ceException)
   at pyRevitLabs.TargetApps.Revit.RevitProduct.ListInstalledProducts()
   at pyRevitLabs.TargetApps.Revit.PyRevit.GetAttachments()
   at pyRevitManager.Views.pyRevitCLI.PrintAttachments() in C:\Users\LeoW10\Desk
top\gits\pyRevit\dev\pyRevitLabs\pyRevitManager\CLI.cs:line 1807
   at pyRevitManager.Views.pyRevitCLI.ExecuteCommand(IDictionary`2 arguments, IE
numerable`1 activeKeys) in C:\Users\LeoW10\Desktop\gits\pyRevit\dev\pyRevitLabs\
pyRevitManager\CLI.cs:line 322
   at pyRevitManager.Views.pyRevitCLI.ProcessArguments(String[] args) in C:\User
s\LeoW10\Desktop\gits\pyRevit\dev\pyRevitLabs\pyRevitManager\CLI.cs:line 205
eirannejad commented 5 years ago

@feait I need more info on the process for Windows 7. What happens after you run the installer? Does it fail or it installs but pyRevit doesn't load? Have you tried running pyrevit attach manually and that didn't work either?

feait commented 5 years ago

The installer ran with no errors, pyRevit just didn't load when you opened Revit after.

I noticed the debug seemed to be identifying Revit 2014 on the machine, generating an error as it is not actually installed on the machine (uninstalled years ago), and then stopping before detecting the other Revit versions installed. I've now deleted all registry entries relating to Revit 2014 and it seemed to have made a difference. It started to identify the 3 versions I do have installed (2016/2017/2019).

I tried uninstalling pyRevit and then reinstalling. The add-in script then ran correctly when i opened Revit! Happy days!

Thanks for the help and all the time I will save using pyRevit!

eirannejad commented 5 years ago

@feait Is there any chance you can get me the build code of your 2014 Revit? Version is listed in the debug log but not the build code. This way I can add it to the code so it recognizes that version from now on.

feait commented 5 years ago

@eirannejad I'm afraid I may have deleted any reference to that when I did the registry purge. Sorry.

Only further information I can offer is that it was likely last updated with the patch from 10 July 2014 as we have that archived. The patch had file version 19.0.53.0.

eirannejad commented 5 years ago

@gdemol @LauraGong @clooz8 Any updates? Did this get resolved for as well?

gdemol commented 5 years ago

@eirannejad I am sorry, but actually not. As posted before I tried to remove the registry keys, but I still get the 'old' Nlog

eirannejad commented 5 years ago

Hey all. Does 4.6.22 solve this issue?

gdemol commented 5 years ago

Hi! I tried to install 4.6.22 (succesfully), but no solution so far.

But hey, the Nlog is updated: image

eirannejad commented 5 years ago

Okay seems like I need to recompile NLog too 🤦🏻‍♂️ Thanks for the feedback. I’ll push a solution on .23 release

gdemol commented 5 years ago

Great! Thanks for al the effort :)

eirannejad commented 5 years ago

@gdemol Would you mind loading your Revit without pyRevit but with RevitPythonShell and run the script below in RPS? I'm trying to gather loaded assembly data to see which addon loads a different version of NLog

from System import AppDomain, Version

for loadedAssembly in AppDomain.CurrentDomain.GetAssemblies():
    loc = ''
    try:
        loc = loadedAssembly.Location
    except Exception:
        pass
    print('{0}{1}{2}'.format(
        loadedAssembly.GetName().Name.ljust(50),
        str(loadedAssembly.GetName().Version).ljust(20),
        loc)
    )
gdemol commented 5 years ago

Oh, I am sorry, i didn't see your reply. Of course, you'll find the results attached: results.xlsx

eirannejad commented 5 years ago

@gdemol Okay would you mind running the same code in RPS this time With pyRevit loaded (it is okay if it breaks on load. Just continue and run the code in RPS)? The last report doesn't have any NLog modules loaded so I'm thinking the assembly resolver might be loading an incorrect version when pyRevit is loading and asks for NLog.

Paste the results in a text file. It's easier to work than Excel.

Thanks

gdemol commented 5 years ago

Yeah, no problem. Here you'll find the results with pyRevit loaded (it did break on load): results_v2.txt

eirannejad commented 5 years ago

@gdemol Okay so the issue is that you have a different NLog version installed on your machine's GAC. When loading, dotnet assembly resolver grabs that NLog and pyRevit fails on load.

GAC is at C:\Windows\Microsoft.NET\assembly\GAC_MSIL

Temp solution is to remove the NLog from GAC so Revit loads the NLog provided by pyRevit.

eirannejad commented 5 years ago

Renamed NLog namespace to pyRevitLabs.NLog and recompiled. This effectively removes the conflict. Will push with v4.6.24

gdemol commented 5 years ago

Nice! This works :) Great job!