-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyRevit Loader Error Revit 2019 pyRevit v4.7.4 #760
Comments
tried this and nothing changes. Edit; Probably no similarity btw errors except being loading error. :) |
Would you please confirm that |
I tried these;
Would you please confirm that Xceed.Wpf.AvalonDock.dll exists in the Revit directory? |
I have recently deployed 4.7.4 to my company computers and one user is having this same issue. EDIT: Clearing the cache with |
No this dosent solved the problem. |
i made a clean install deleted all of the files but still no change. İ don't know it's normal or not but, after clean install, the config file dosnt contain these lines
only this one
and i added
|
Copied these lines to 4.7.4 config file. nothing changed |
@Kaankrby There rest of the config lines are added when pyRevit loads for the first time. |
I don't have any coding skill :) i try what i can. |
is there any update |
Try the new 4.7.5 and see if this has been fixed |
This might be a conflict with another addon. Try disabling the other addons using this tool and see if pyRevit loads by itself. |
tried but nothing changes. Can be a regional problem. wil try with a clean install rvt20 |
Okay would you mind:
def _setup_output():
# create output window and assign handle
with open(op.join(USER_DESKTOP, 'debug.log'), 'w') as f:
f.writelines(
"runtime is loaded as: {}"
"runtime.types is loaded as: {}"
"runtime.types.ScriptConsole is loaded as: {}\n".format(
runtime,
runtime.types,
runtime.types.ScriptConsole
))
try:
out_window = runtime.types.ScriptConsole()
except Exception as ex:
f.writelines(str(ex))
out_window = runtime.types.ScriptConsole()
runtime_info = sessioninfo.get_runtime_info()
out_window.AppVersion = '{}:{}:{}'.format(
runtime_info.pyrevit_version,
runtime_info.engine_version,
runtime_info.host_version
)
# create output stream and set stdout to it
# we're not opening the output window here.
# The output stream will open the window if anything is being printed.
outstr = runtime.types.ScriptIO(out_window)
sys.stdout = outstr
# sys.stderr = outstr
stdout_hndlr = logger.get_stdout_hndlr()
stdout_hndlr.stream = outstr
return out_window
Send me that file please |
code dosn't work. added
and changed
*i am not an expert, writing what i am doing. |
Ugh sorry. Modify line 17 at the top as well:
This should work now |
Okay let me see if I can offer a few more changes to better debug the issue |
made these. |
Okay. One more try. Replace the previous function with this: def _setup_output():
# create output window and assign handle
try:
out_window = runtime.types.ScriptConsole()
except Exception as ex:
with open(op.join(USER_DESKTOP, 'debug.log'), 'w') as f:
f.writelines(ex.clsException.Message)
f.writelines(ex.clsException.Source)
f.writelines(ex.clsException.StackTrace)
f.writelines(ex.clsException.TargetSite.ToString())
# runtime_info = sessioninfo.get_runtime_info()
# out_window.AppVersion = '{}:{}:{}'.format(
# runtime_info.pyrevit_version,
# runtime_info.engine_version,
# runtime_info.host_version
# )
# # create output stream and set stdout to it
# # we're not opening the output window here.
# # The output stream will open the window if anything is being printed.
# outstr = runtime.types.ScriptIO(out_window)
# sys.stdout = outstr
# # sys.stderr = outstr
# stdout_hndlr = logger.get_stdout_hndlr()
# stdout_hndlr.stream = outstr
# return out_window Then run again and take a screenshot of the error message that pops up |
Ugh. This went somewhere else completely. Hmmmmm. Okay give me time to think a bit |
|
this wasnt a problem for 4,6 |
when all the options are correct, i start revit and pyrevit loads well. i reload pyrevit its works well after close and re open revit again crashes. |
Okay great! I can replicate the issue now. Let me dig into it and figure out why this happens |
Solved. In C# the method
namespace PyRevitLabs.PyRevit.Runtime {
public static class DomainStorageKeys {
public static string keyPrefix = PyRevitLabsConsts.ProductName.ToUpperInvariant();
public static string EnvVarsDictKey = keyPrefix + "EnvVarsDict";
public static string EnginesDictKey = keyPrefix + "CachedEngines";
public static string IronPythonEngineDefaultStreamCfgKey = keyPrefix + "CachedEngineDefaultStreamCfg";
public static string OutputWindowsDictKey = keyPrefix + "OutputWindowsDict";
}
public static class EnvDictionaryKeys
{
public static string keyPrefix = PyRevitLabsConsts.ProductName.ToUpperInvariant();
... I'll make changes to the code and will publish this fix with the next 4.7.6 release soon |
getting this error when starting Revit 2019.
The text was updated successfully, but these errors were encountered: