Open AnakinSamB opened 6 months ago
Hi @AnakinSamB , I see that you have a quite old version of pyrevit, can you please upgrade it and check if the issue persist? I've fixed some (but not all) of the problems of cpython in version 4.8 15. Hopefully we'll have a working cpython environment for pyRevit 5 release!
Hi @sanzoghenzo, thanks for the quick reply, unfortunately that did not solve the problem :/. If there is no quick solution i can also wait for the latest version to be released and if that does not fix the error, i will report back here.
Is the error the same? Also, do you confirm that the sample code you posted raises the same error? I ask because the error messages says that the error is at line 7, but the sample code has 4 lines... could it be that you're importing something else before printing?
I tried something else before posting the bug but it did not resolve the issue, thats why the error message says line 7... sorry for the confusion -> the sample code creates the same error
Do you have any lib
folder in that extension, or other loaded extensions?
Can you please try to unload all your extension, enable the pyRevitDevTools (from the Extensions manager) and then run the "Engine Tests" -> "Test CPython Command" or "Test CPython Search paths"?
Good Afternoon,
the error code when i start Text Cpython Command:
when i start Text Cpython Search paths:
i forgot to mention that i could not find any lib folder either in the current custom extension or any other custom extension
I honestly don't know what's going on...
Not sure if it's related, but one thing I see from the pyrevit env
output you posted is that under the "running Revit instances" you have the following:
PID: 8216 | 2021.1.6 | Version: 21.1.60.25 | Build: 20220123_1515(x64) | Language: 0 | Path: ""
But that version is not listed in the "Installed Revits". Does it say the same thing also with the new pyrevit version?
@jmcouffin have you seen something like this before?
yes it does, i could try to change it, but i would need help
yes it does, i could try to change it, but i would need help
please copy paste the whole pyrevit env
report, not just bits and pieces
@jmcouffin have you seen something like this before?
yes, but my install of python 3.8 is a bit of a mess, so this is not entirely relevant.
@jmcouffin have you seen something like this before?
yes, but my install of python 3.8 is a bit of a mess, so this is not entirely relevant.
I was referring to the fact that the running revit instance states version "2021.1.6", which is not in the "Installed Revits"...
It may be totally unrelated to the issue, though...
I was referring to the fact that the running revit instance states version "2021.1.6", which is not in the "Installed Revits"...
to my knowledge it is unrelated.
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.15.24089+0912" | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "24.2" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
master | Product: "2022.1.2" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
master | Product: "2020.2.5" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
master | Product: "2019.2.2 Hotfix" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
master | Product: "2018 First Customer Ship" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
master | Product: "2017 First Customer Ship" | Engine: DEFAULT (2711) | Path: "C:\Users\s.benkendorf\AppData\Roaming\pyRevit-Master"
==> Installed Extensions
Revit-Entwicklung | Type: Unknown | Repo: "" | Installed: "T:\CAD\Revit-Entwicklung\08_APPs\Entwicklung_Extensions\Revit-Entwicklung.extension"
==> Default Extension Search Path
C:\Users\s.benkendorf\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
T:\CAD\Revit-Entwicklung\08_APPs\Entwicklung_Extensions
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
24.2 | Version: 24.2.0.63 | Build: 20231029_1515(x64) | Language: 1033 | Path: "C:\Programme\Autodesk\Revit 2024\"
2022.1.2 | Version: 22.1.21.13 | Build: 20220123_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
2020.2.5 | Version: 20.2.50.77 | Build: 20210804_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
2019.2.2 Hotfix | Version: 19.2.20.24 | Build: 20190808_0900(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019\"
2018 First Customer Ship | Version: 18.0.0.420 | Build: 20170223_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018\"
2017 First Customer Ship | Version: 17.0.416.0 | Build: 20160225_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2017\"
==> Running Revit Instances
PID: 14384 | 2021.1.6 | Version: 21.1.60.25 | Build: 20220123_1515(x64) | Language: 0 | Path: ""
==> User Environment
Microsoft Windows 10 [Version 10.0.19045]
Executing User: ZWP-NETZ\s.benkendorf
Active User: ZWP-NETZ\s.benkendorf
Admin Access: No
%APPDATA%: "C:\Users\s.benkendorf\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
Installed .Net-Core Target Packs: v7.0.118 v7.0.315 v7.0.408
pyRevit CLI v4.8.15.24089+0912.f079f5fd51756b988a06d005d4f4cd2961f36e63
HI @AnakinSamB, could you please try the latest WIP installer? We have updated the pythonnet library along with the support to Revit 2025.
Hopefully the problem went away :crossed_fingers:
Hi @sanzoghenzo, i installed the newest Pyrevit Version 4.8.16.24121+2117 and CPython returns now a new error when i try to import from Autodesk.Revit.DB
CPython Traceback:
SystemError :
pyRevitLabs.PythonNet bei Python.Runtime.Runtime.CheckExceptionOccurred() bei Python.Runtime.PyScope.Exec(String code, IntPtr _globals, IntPtr _locals) bei Python.Runtime.PyScope.Exec(String code, PyDict locals) bei PyRevitLabs.PyRevit.Runtime.CPythonEngine.Execute(ScriptRuntime& runtime)
Hi @AnakinSamB, the version to test is the WIP installer found in the pyrevitlabs.io main page, here's the direct link
I just tested on my local copy (that is in line with #2384) and from Autodesk.Revit.UI import *
works without any issue
@jmcouffin I believe CPython is more or less fixed, the big thing that is still missing is to make pyrevit.forms
(= WPF) work with it
✈ Pre-Flight checks
🐞 Describe the bug
Code snippet to reproduce: I have no problems using iron python but i would like to use some Cpython features. Thanks in advance
⌨ Error/Debug Message
♻️ To Reproduce
No response
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
No response