Page 1 of 2
CudaExt seems not to work in Linux with Py 3.5
Posted: 28.05.2020 13:24
by tmsg
Well, the title says it all. I've installed the cuda_ext plugin on Linux and the plugin just doesn't seem to do anything. No function I tried seems to work. The console shows no error messages.
EDIT: I think I've found the reason (or at least part of it). On my Windows boxes the Python used is the v3.6 included with Cud. Under Linux I have a slightly older v3.5. And the cd_kv_dlg.py module uses f-strings... which are only available starting with v3.6.
I will patch the file so it doesn't use those strings anymore but IMHO it would probably be a good idea to remove this as there are a few backward-compatible methods to format a string.
EDIT2: Well, patching away these strings is easier said than done as they're used in many places. I do have a running version now but I am not at all sure it's correct. So I've abandoned the Linux version of the plugin for now.

Posted: 28.05.2020 19:32
by Alexey
The outdated version is in addons:
CudaExt_py35
Posted: 28.05.2020 20:11
by tmsg
Alexey wrote:The outdated version is in addons:
CudaExt_py35
\Hm.. does "outdated" mean that v3.6 is a minimum requirement across the supported platforms?
Posted: 28.05.2020 20:46
by Alexey
yes, we assume that people have 3.6. CudaExt_py35 is old.
Posted: 29.05.2020 10:31
by tmsg
Alexey wrote:yes, we assume that people have 3.6. CudaExt_py35 is old.
I think that assumption is less problematic under Windows where many people don't have Python at all and so will use the Python that comes with Cud anyway. However, I am a lot less sure about Linux. Different distros come with different versions of Python 3 and many people might be wary to touch their Python install. It is not that hard to install a second, third... Python in parallel -- if you know how to do it. But then again, it is also not that hard to write a text editor -- if you know how to do it
And then there's the question whether f-strings are such an important new and irreplaceable feature of Python 3.6 that Cud plugins can't be written without it? I am not a Python expert but I doubt it. Sticking with an older version may be less glamorous but it's also more defensive. Just my 2ยข.
Posted: 29.05.2020 14:13
by Alexey
Hm, it is the question to @kvichans, he likes f-strings and new Python
Posted: 29.05.2020 14:16
by Alexey
I fully agree and I don't use 3.6 features in my plugins (it seems).
Posted: 29.05.2020 15:22
by tmsg
Anyway, I have now followed your advice and downloaded the py35 version of the plugin. After transplanting the two cd_kv_*.py files into my version of the FiL code, it seems to work with the local Python v3.5. Fingers crossed.
Posted: 03.06.2020 08:54
by kvichans
New version cude_ext-35 is published. Now FiL is equal to cude_ext.
News:
- Resize in non-docked mode both inputs.
- In docked-mode inputs have widths as in non-docked mode.
Posted: 03.06.2020 10:22
by tmsg
@kvichans: I've checked the new py35 version, there's an error:
Code: Select all
File "Z:\q\py\cuda_ext_py35\cd_kv_dlg.py", line 467, in _check_data
raise ValueError(f('Repeated names: {}', set(cids_d)))
ValueError: Repeated names: {'what'}
I think you copied and changed line 146 in cd_ext_find_repl.py and forgot to comment the original line
Otherwise that looks good. Resizing both fields is better (I almost never use the cmbx anyway).