pyrevitlabs / pyRevit

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

Error: IronPython Traceback #2093

Closed iamian33 closed 4 months ago

iamian33 commented 9 months ago

🙏 Please use the search in the issue section before filing a new issue


🐞 Describe the bug

our company has a new IT with their new protocols. Now I cannot run PyRevit with R2024, 22 and 23 are fine. I get this error ... image IronPython Traceback

Tried installing the latest pyRevit version and pyRevit_4.8.12.22247_signed

This outside IT cannot understand how to fix things and their understanding of basic Autodesk products is limited.
They tried 👉 pyrevit attach master 2711 --installed with no success.

If someone can provide direction that I can pass on to our IT, I would be most grateful ... missing my _tools

Ian

If you have installed pyRevit, and the installation completed with no errors but pyRevit doesn't load, please run the command below in terminal / command line. This should fix the issue on your machine, however, please continue filing the issue with instructions below.

👉 pyrevit attach master 2711 --installed

If it does not work, try to disable your revit addins, all of them. Then, one at a time, reactivate them and restart Revit to figure out which one is interacting badly with pyRevit and Report.

♻️ To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

⏲️ Expected behavior

A clear and concise description of what you expected to happen.

🖼 Screenshots of the issue

If applicable, add screenshots to help explain your problem.

🖥️ Hardware and Software Setup (please complete the following information):

👉 pyrevit env

Additional context

Add any other context about the problem here.

sanzoghenzo commented 9 months ago

Hi, please make sure to install the latest version (4.8.14) and post the error it gives you; it should be different from the one you posted (if any).

Also, please follow and fill the issue template in order to provide us as much info as possible to help you.

iamian33 commented 9 months ago

Hi and thanks for your response. I have installed 4.8.14.2406: image

Unfortunately CMD is disabled by our IT. This is a new PC running Windows 11.
Please forgive my very limited programming ability but I cannot locate the issue template.
Ian

sanzoghenzo commented 9 months ago

This is a common error, see here for possible resolutions.

iamian33 commented 9 months ago

Andrea.

We tried your suggestions with no success. Please see the attached email from my IT. It is strange how PyRevit attaches to my R22 an R23 but not R24. Maybe you have other suggestions??

Ian

iamian33 commented 9 months ago

Apologies,

PyRevit does not attach to any of my Revit installs (22, 23 or 24)

I am certain that there’s an IT protocol killing it.

Hope you have more suggested solutions.

Ian

sanzoghenzo commented 9 months ago

HI @iamian33 , when replying by email, please delete the previous messages from the text, so that the GitHub discussion stays clean.

Also, I don't see any attached email, github issues doesn't work like an email. Paste the contents of the message in the discussion.

That being said, does your company use SentinelOne protection by any chance?

iamian33 commented 9 months ago

Thanks for the guidance. Please see below the information I received from my IT regarding the unsuccessful efforts made to install PyRevit:

I followed the steps and ran the commands, unfortunately it did not work.

and this command

pyrevit attach master 2711 --installed

I also ran these commands: pyrevit attach core 2711 --installed --allusers

pyrevit attach master 2711 --installed --allusers

pyrevit env

Here is a screenshot of the error:

Here are the responses to the questions in the email if issue persists:

OS: Windows 11 Business

pyREVIT Version: 4.8.12.22247

pyRevit Environment:

==> Registered Clones (full git repos)

==> Registered Clones (deployed from archive/image)

master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.12.22247+0031" | Path: "C:\Users\IanShafer\AppData\Roaming\pyRevit-Master"

==> Attachments

master | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2711) | Path: "C:\Users\IanShafer\AppData\Roaming\pyRevit-Master" | AllUsers

master | Product: "Autodesk Revit 2023" | Engine: DEFAULT (2711) | Path: "C:\Users\IanShafer\AppData\Roaming\pyRevit-Master" | AllUsers

master | Product: "Autodesk Revit 2022" | Engine: DEFAULT (2711) | Path: "C:\Users\IanShafer\AppData\Roaming\pyRevit-Master" | AllUsers

==> Installed Extensions

==> Default Extension Search Path

C:\Users\IanShafer\AppData\Roaming\pyRevit\Extensions

==> Extension Search Paths

==> Extension Sources - Default

https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json https://url.emailprotection.link/?bMq2pSZpLfHKZSFzJ8VS7wbRJVSBZU8rgV9oJEFJGVP5d2FQO4hkzo9MD8nia5yfwlrnUQYrqKGA20rpvphsQ8sxnpjFBNWTrRmgoguH__RKeJSWMtaXH1iTCulbkZtRC

==> Extension Sources - Additional

==> Installed Revits

Autodesk Revit 2024 | Version: 24.2.0.63 | Build: 20231029_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"

Autodesk Revit 2023 | Version: 23.1.30.97 | Build: 20230828_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"

Autodesk Revit 2022 | Version: 22.1.50.17 | Build: 20230915_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"

==> Running Revit Instances

==> User Environment

Microsoft Windows 10 [Version 10.0.22621]

Executing User: AzureAD\IanShafer

Active User: AzureAD\IanShafer

Admin Access: No

%APPDATA%: "C:\Users\IanShafer\AppData\Roaming"

Latest Installed .Net Framework: 4.8

No .Net Target Packs are installed.

No .Ne-Core Target Packs are installed.

pyRevit CLI v4.8.12.22247+0031

Screenshot:

I also tried solutions from the links below but it did not work:

https://github.com/eirannejad/pyRevit/issues/2055#issuecomment-1900674214 https://url.emailprotection.link/?bzMz3FCBUzbjwxQJzijwLikiYECagw2J0QEydGKZdO-4Ddz3DxxrAQt3VpjFp1KoxGmtChwaphtWpz7ItVwS9OMbsUOgZFOj5uudHjAK0NNDratgRW1EDTLVKAvLtILq-

https://discourse.pyrevitlabs.io/t/error-message-loading-pyrevit-in-2023/948/2 https://url.emailprotection.link/?bM1tPvZPZbm-Nvya5WB6wiN4fayFn_AiFa30OB4u4mGWEmQnSTqCv6jmb3fdLBHHa-WlnxGZj0wfAweysTH4iGK7uaFY4jO2srXx1afAcVEMv6KajlPprT8zZqIJDQRKH

https://discourse.pyrevitlabs.io/t/error-message-loading-pyrevit-in-2023/948/21 https://url.emailprotection.link/?bhw5iBVGbOdlpA0HXeLxbgSReRcWo18672HliyFx4OuVYkL_qzXjqQpkleeO7Go_MrsCaVDi-p9KXMNxCenUjwwbgWK741-A7_AbxDwugaPbOVwX0DceSeWA5DF1tAC4i

Running the command “pyrevit attached” gave the result:

Running the command “pyrevit clones” gave the result:

This might be helpful to the community to help resolve the issue.

Thanks,

Ian

sanzoghenzo commented 9 months ago

please, use the "view on GitHub" link at the bottom of the email message and post your info directly there, we lost all the pictures!

BIMGSE commented 5 months ago

Hello, we have the same exact problem. All machines in our company have the problem with Pyrevit not working for Revit 2024. This is extremely frustrating and our IT department have been working out for months how to fix it without any luck. It makes all of us lose our hair this is so stressful because PyRevit is so convinient to use.

Has a solution been found ?

czwangxtt commented 5 months ago

We are having this issue in our company too. A lot of machine shows exactly the same error when lunching the Revit. The issue is caused by an incompatible dependency that was loaded before pyRevit. The idea is to clean out the addins and let pyRevit load first. We find a solution from an older issue which solves the issue. However, it takes a lot of effort to fix all our machines.

Here are the steps we took.

  1. Uninstall all pyRevit versions
  2. Go to C:\Users\\AppData\Roaming and delete all folders related to pyrevit, i.e. pyRevit, pyRevit-Master.
  3. Go to C:\Users\\AppData\Roaming\Autodesk\Revit\Addins\, move everything in this folder to a temp location.
  4. Go to C:\ProgramData\Autodesk\Revit\Addins\, move everything in this folder to another temp location.
  5. Reinstall pyRevit
  6. Go to C:\Users\\AppData\Roaming\Autodesk\Revit\Addins\ and rename pyRevit.addin to 0_pyRevit.addin
  7. Run Revit and close.
  8. Reverse step 3 and step 4 to bring all .addin to the original location.
sanzoghenzo commented 4 months ago

I get the following when trying to use find all revisions sheets IronPython Traceback: Traceback (most recent call last): File "C:\Users\Ricardo\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Revision.pulldown\Find All Revised Sheets.pushbutton\script.py", line 16, in File "C:\Users\Ricardo\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\revit\report.py", line 16, in print_revision AttributeError: 'Revision' object has no attribute 'NumberType'

Please create a new issue for this, it is a totally unrelated problem!

sanzoghenzo commented 4 months ago

Im going to close this issue since @iamian33 didn't reply in 5 months, and the solution provided is the one explained in the installation troubleshooting guide