HEKPOMAHT Posted April 23, 2020 Share Posted April 23, 2020 17 минут назад, sergbodr сказал: Странно, часы и дата в квадратики ушли. проверь шрифт. Если указан $IMELanguageBar - замени на другой. Выпилили его с клиента. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
sergbodr Posted April 23, 2020 Share Posted April 23, 2020 @HEKPOMAHT жаль, а на какой лучше заменить, он у меня во многих конфигах запилен @ Quote Link to comment Short link Share on other sites More sharing options...
HEKPOMAHT Posted April 23, 2020 Share Posted April 23, 2020 @sergbodr в зависимости от конфига. Но если шрифт не указан - в экста полях будет грузиться дефолный $FieldFont. В стандартных будет грузиться стандартный. В любом случае пустых глифов не будет. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted April 23, 2020 Share Posted April 23, 2020 3 минуты назад, sergbodr сказал: а на какой лучше заменить $FieldFont Это один и тот же шрифт: <alias> <embedded> $FieldFont </embedded> <runtime> ZurichCond </runtime> </alias> <alias> <embedded> $IMELanguageBar </embedded> <runtime> ZurichCond </runtime> </alias> 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Shumaherxxx Posted December 26, 2020 Share Posted December 26, 2020 (edited) Часы и дата пропали в бою и ангаре евро сервер 2020-12-26 23:38:33: [INFO] HTTPS: /4.0/getStatsByNick/ae58d8b9-****-****-****-********8c44/EU/Krasniixxx 2020-12-26 23:38:33: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 165, in process_python_macro return (func(), deterministic) File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 158, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 61, in xvm_formatDate formatDate = formatDate.decode('utf8').encode(_defaultlocale) LookupError: unknown encoding: cp65001 arg='xvm.formatDate('%A')' 2020-12-26 23:38:33: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 165, in process_python_macro return (func(), deterministic) File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 158, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 61, in xvm_formatDate formatDate = formatDate.decode('utf8').encode(_defaultlocale) LookupError: unknown encoding: cp65001 arg='xvm.formatDate('%H:%M:%S')' 2020-12-26 23:38:33: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 165, in process_python_macro return (func(), deterministic) File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 158, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 61, in xvm_formatDate formatDa xvm.log python.log Edited December 27, 2020 by Shumaherxxx 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Heliomalt Posted December 27, 2020 Share Posted December 27, 2020 clock and date working as usual, you break something with your editor, check encoding settings. @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted December 27, 2020 Author Share Posted December 27, 2020 Наверное надо @Mixaill взглянуть. @ Quote Link to comment Short link Share on other sites More sharing options...
Shumaherxxx Posted December 28, 2020 Share Posted December 28, 2020 (edited) Исправел ,путем снятие галочки тут Edited December 30, 2020 by Shumaherxxx 1 @ Quote Link to comment Short link Share on other sites More sharing options...
HEKPOMAHT Posted September 2, 2022 Share Posted September 2, 2022 @ktulho человек скинул логи с другими модами (не XVM) конструкции: "{{py:xvm.formatDate('%H{{py:mod({{py:xvm.formatDate('%#S')}},2)=1?:| }}%M')}}" "{{py:xvm.formatDate('%A')}}" ошибки: 2022-09-02 09:17:18: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 157, in process return (func(), deterministic) File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 123, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 61, in xvm_formatDate formatDate = formatDate.decode('utf8').encode(_defaultlocale) LookupError: unknown encoding: cp65001 arg='xvm.formatDate('%d.%m.%Y')' 2022-09-02 09:17:18: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 157, in process return (func(), deterministic) File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 123, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 61, in xvm_formatDate formatDate = formatDate.decode('utf8').encode(_defaultlocale) LookupError: unknown encoding: cp65001 arg='xvm.formatDate('%#S')' 2022-09-02 09:06:04: [ERROR] Traceback (most recent call last): File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process (func, deterministic) = __get_function(arg) File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function args = ast.literal_eval(args_string) File "scripts/common/Lib/ast.py", line 49, in literal_eval File "scripts/common/Lib/ast.py", line 37, in parse File "<unknown>", line 1 (,2) ^ SyntaxError: invalid syntax arg='mod(,2)' в моём конфиге без других модов этих ошибок нет ---- походу евросервер ---- хз - решение вот походу: 28.12.2020 в 04:50, Shumaherxxx сказал: Исправел ,путем снятие галочки тут @ Quote Link to comment Short link Share on other sites More sharing options...
RegularMan Posted September 2, 2022 Share Posted September 2, 2022 (edited) Сервер не евро, а северо-американский. Не называл бы это решением, скорее костылем, но попробовал - помогло. Edited September 2, 2022 by RegularMan @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted January 28, 2023 Share Posted January 28, 2023 (edited) I am editing my custom clock widget on the hangar. I found that in py_macro\xvm.py, the module datetime does not get "timezone" info, so I cannot get from datetime.datetime.now() and related things any timezone reference. Instead, I found that the module "time" does. So, In the py_macro\xvm.py file, I inserted the following lines: import time @xvm.export('xvm.tzoffset', deterministic=False) def xvm_tzoffset(): offset = time.strftime('%z') return offset and in the widgetsTemplates.xc, I called it with {{py:xvm.tzoffset}} But nothing appears in the place. It does not crash the mod (so that the xvm resort to the default profile) either. What should I do? If the code works as I intended, a text like Quote +0900 should appear in place. Ahh, nevermind. A bit of tweaking and restarting the client, now works. Edited January 28, 2023 by Genba_Kantoku_s @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.