getting this error when starting Revit 2019.


Similar here.
Not sure if we tried this before or not but open a command prompt and run pyrevit caches clear --all to clear all the exiting caches.
Also look into your pyRevit config file (%APPDATA%/pyRevit/pyRevit_config.ini) and make sure bincache = true
tried this and nothing changes.
Edit; Probably no similarity btw errors except being loading error. :)
Would you please confirm that Xceed.Wpf.AvalonDock.dll exists in the Revit directory?
I tried these;
Not sure if we tried this before or not but open a command prompt and run pyrevit caches clear --all to clear all the exiting caches. Also look into your pyRevit config file (%APPDATA%/pyRevit/pyRevit_config.ini) and make sure bincache = true
Seems like you are missing the pyRevitLabs.TargetApps.Revit dll. Make sure antivirus doesn't accidentally delete the file and is available under the bin/ directory. Install multiple times if needed to test.
Okay. Which CLI version are you using? run pyrevit --version
Add the installed clone using
pyrevit clones add master "C:\Users\arthur.banks\AppData\Roaming\pyRevit-Master"
Then run the pyrevit env again and verify master is listed under ==> Registered Clones (deployed from archive)
Now reattach the clone to the installed Revits using
pyrevit attach master 277 --installed
Would you please confirm that Xceed.Wpf.AvalonDock.dll exists in the Revit directory?
Yes it exist


Yes. it is present.
I have recently deployed 4.7.4 to my company computers and one user is having this same issue.
EDIT: Clearing the cache with pyrevit caches clear 2019 seems to have solved the issue.
I have recently deployed 4.7.4 to my company computers and one user is having this same issue.
EDIT: Clearing the cache with
pyrevit caches clear 2019seems to have solved the issue.
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
[environment]
clones = {"master":"C:\Users\ITopya\AppData\Roaming\pyRevit-Master"}[core]
checkupdates = false
autoupdate = false
verbose = true
debug = false
filelogging = false
startuplogtimeout = 10
userextensions = []
compilecsharp = true
compilevb = true
loadbeta = false
rocketmode = true
bincache = true
usercanupdate = true
usercanextend = true
usercanconfig = true[usagelogging]
active = false
logfilepath = ""
logserverurl = ""[pyRevitTags.extension]
disabled = true
private_repo = true
username = ""
password = ""[pyRevitTools.extension]
disabled = false
private_repo = true
username = ""
password = ""[pyRevitTutor.extension]
disabled = true
private_repo = true
username = ""
password = ""
only this one
[environment]
clones = {"master":"C:\Users\ITopya\AppData\Roaming\pyRevit-Master"}
and i added
bincache = true
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.
@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.
Still it's not working, using 4,6
is there any update
Try the new 4.7.5 and see if this has been fixed
Sorry but still the same

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.
In turkey, i try in 3 different office and may be 10 pc.
Always the same.
Can be a regional problem.
Some of the pc languege was English too.
wil try with a clean install rvt20
Okay would you mind:
/pyrevitlib/pyrevit/loader/sessionmgr.py in your pyRevit install path (default is %APPDATA%/pyRevit-Master_setup_output function to this: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
pyrevit caches clear --alldebug.log file on your desktop.Send me that file please
code dosn't work.
added
import os
and changed
with open(op.join(op.join(op.join(os.environ['USERPROFILE']), 'Desktop'), 'debug.log'), 'w') as f:
*i am not an expert, writing what i am doing.
Ugh sorry. Modify line 17 at the top as well:
from pyrevit import EXEC_PARAMS, HOST_APP, USER_DESKTOP
This should work now open(op.join(USER_DESKTOP, 'debug.log')
Okay let me see if I can offer a few more changes to better debug the issue
Ugh sorry. Modify line 17 at the top as well:
from pyrevit import EXEC_PARAMS, HOST_APP, USER_DESKTOPThis should work now
open(op.join(USER_DESKTOP, 'debug.log')
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
i think this will help.
windows has a region setting and language setting.
i changed both of them to U.S.
Now my pc thinks i live in U.S and my pc language English too.
And the result.


Yes its working.
Any problem.But when i change region to Turkey. Still language is English.

Same issue.
and the last one.

regional settings US
region TURKEY
it works.

This option changes Date format and number format.
and i find;
turkey number:

usa number:

this wasnt a problem for 4,6
staring with beta of 4,7 this problem occurs.

i think the problem dosnt related directly to number decimal symbol.
Because its work for europe too.
And europe is same Turkey
when all the options are correct, i start revit and pyrevit loads well.
then i change the local to TURKEY.
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 String.ToUpper() uses the active locale so pyRevit was being capitalized as PYREV脥T in Turkish
pyrevitlib/pyrevit/runtime/EnvVariables.cs.ToUpper() call to .ToUpperInvariant() on lines 11 and 21namespace 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
Most helpful comment
I have recently deployed 4.7.4 to my company computers and one user is having this same issue.
EDIT: Clearing the cache with
pyrevit caches clear 2019seems to have solved the issue.