Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lib folders clash with pyrevit

1 REPLY 1
Reply
Message 1 of 2
PieterL_TM
255 Views, 1 Reply

Lib folders clash with pyrevit

PieterL_TM
Advocate
Advocate

In the 'extension' folder of my personal pyrevit extension, I have a 'lib' folder. In that 'lib' folder I have several other folders which contain an __init__-file and other .py-files.

Now I get these errors, when pressing various buttons:

 

Traceback (most recent call last):
 File "L:\0_8_REVIT\09_S3A_Tools\S3A_Tools.extension\S3A_Tools.tab\07_Andere Tools.Panel\Verwijder Rooms.pushbutton\verwijder rooms_script.py", line 5, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\__init__.py", line 35, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\__revit.py", line 25, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\utils\dotnet.py", line 32, in <module>
ImportError: cannot import Enum from System
IronPython Traceback:
Traceback (most recent call last):
 File "L:\0_8_REVIT\09_S3A_Tools\S3A_Tools.extension\S3A_Tools.tab\04_Views en Sheets.Panel\Views en Sheets 1.stack\Kopieer Views.pushbutton\Kopieer Views_script.py", line 6, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\__init__.py", line 94, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\framework.py", line 26, in <module>
AttributeError: 'module' object has no attribute 'Linq'

Different tools give different errors

In scripts where I don’t use pyrevit libraries there are no issues. In scripts where I do (I mainly use 'script' and 'forms') an error pops up.

What could be the problem?

0 Likes

Lib folders clash with pyrevit

In the 'extension' folder of my personal pyrevit extension, I have a 'lib' folder. In that 'lib' folder I have several other folders which contain an __init__-file and other .py-files.

Now I get these errors, when pressing various buttons:

 

Traceback (most recent call last):
 File "L:\0_8_REVIT\09_S3A_Tools\S3A_Tools.extension\S3A_Tools.tab\07_Andere Tools.Panel\Verwijder Rooms.pushbutton\verwijder rooms_script.py", line 5, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\__init__.py", line 35, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\__revit.py", line 25, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\rpw\utils\dotnet.py", line 32, in <module>
ImportError: cannot import Enum from System
IronPython Traceback:
Traceback (most recent call last):
 File "L:\0_8_REVIT\09_S3A_Tools\S3A_Tools.extension\S3A_Tools.tab\04_Views en Sheets.Panel\Views en Sheets 1.stack\Kopieer Views.pushbutton\Kopieer Views_script.py", line 6, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\__init__.py", line 94, in <module>
 File "C:\Users\PieterL\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\framework.py", line 26, in <module>
AttributeError: 'module' object has no attribute 'Linq'

Different tools give different errors

In scripts where I don’t use pyrevit libraries there are no issues. In scripts where I do (I mainly use 'script' and 'forms') an error pops up.

What could be the problem?

Tags (2)
Labels (2)
1 REPLY 1
Message 2 of 2
jeremy_tammik
in reply to: PieterL_TM

jeremy_tammik
Autodesk
Autodesk

This forum is dedicated to the pure Revit desktop .NET API. Probably better raise this pyRevit-specific issue in some forum targeted more directly at pyRevit instead. Maybe as an issue in the GitHub repo?

  

https://github.com/eirannejad/pyRevit/issues

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

This forum is dedicated to the pure Revit desktop .NET API. Probably better raise this pyRevit-specific issue in some forum targeted more directly at pyRevit instead. Maybe as an issue in the GitHub repo?

  

https://github.com/eirannejad/pyRevit/issues

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report