Hi @nemad ,
Thanks for looking into this!
You were absolutely right that setting the env variable would solve the encoding issue. However, it still seems odd to me because all my extension’s files are already UTF-8 encoded.
As you expected, fixing this revealed a different error:
(knime_5.1.0_extension_bundling) C:\>conda env config vars list
(knime_5.1.0_extension_bundling) C:\>conda env config vars set PYTHONIOENCODING=utf8
To make your changes take effect please reactivate your environment
(knime_5.1.0_extension_bundling) C:\>conda activate knime_5.1.0_extension_bundling
(knime_5.1.0_extension_bundling) C:\>conda env config vars list
PYTHONIOENCODING = utf8
(knime_5.1.0_extension_bundling) C:\>build_python_extension.bat C:\Users\[MY USERNAME]\Documents\KNIME\Extensions\[my extension folder] C:\Users\[MY USERNAME]\Desktop\[my extension name]_v1.0.0_knime5.1.0
(knime_5.1.0_extension_bundling) C:\>python "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\bin\build_python_extension.py" C:\Users\[MY USERNAME]\Documents\KNIME\Extensions\[my extension folder] C:\Users\[MY USERNAME]\Desktop\[my extension name]_v1.0.0_knime5.1.0
INFO:__main__:Filling template files from C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\bin\templates\python-extension-plugin
and storing the resulting plugin to
C:\Users\[MY USERNAME]\AppData\Local\Temp\tmp7sdi9sy4\[my extension name]\src\main\python.
Using bundle name '[my extension name].channel.bin'.
Using plugin template from 'C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\bin\templates\conda-channel-plugin'.
Rendering plugin to 'C:\Users\[MY USERNAME]\AppData\Local\Temp\tmp7sdi9sy4\[my extension name].channel.bin'...
Using bundle name '[my extension name].channel.bin'.
Using fragment template from 'C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\bin\templates\conda-channel-platform-fragment'.
Rendering fragment for linux-64 to 'C:\Users\[MY USERNAME]\AppData\Local\Temp\tmp7sdi9sy4\[my extension name].channel.bin.linux.x86_64'...
Running 'conda-lock lock --micromamba --no-mamba -f C:\Users\[MY USERNAME]\Documents\KNIME\Extensions\[my extension folder]\conda_env.yml -c conda-forge -c knime -p linux-64 --lockfile C:\Users\[MY USERNAME]\AppData\Local\Temp\tmpkcn9a4pj\lockfile'...
Running command failed with exit code 1. Standard output: '' Standard error: 'C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\pydantic\_internal\_config.py:269: UserWarning: Valid config keys have changed in V2:
* 'allow_mutation' has been removed
warnings.warn(message, UserWarning)
Traceback (most recent call last):
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 1041, in _create
self.do_handshake()
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 1310, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] Une connexion existante a dû être fermée par l’hôte distant
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 1041, in _create
self.do_handshake()
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\ssl.py", line 1310, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'Une connexion existante a dû être fermée par l’hôte distant', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\Scripts\conda-lock-script.py", line 9, in <module>
sys.exit(main())
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\conda_lock.py", line 1332, in lock
lock_func(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\conda_lock.py", line 1040, in run_lock
make_lock_files(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\conda_lock.py", line 328, in make_lock_files
lock_spec = make_lock_spec(
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\__init__.py", line 89, in make_lock_spec
lock_specs = _parse_source_files(src_files, platforms)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\__init__.py", line 70, in _parse_source_files
desired_envs.append(parse_environment_file(src_file, platforms))
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\environment_yaml.py", line 127, in parse_environment_file
dep_map = {
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\environment_yaml.py", line 128, in <dictcomp>
platform: _parse_environment_file_for_platform(content, category, platform)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\environment_yaml.py", line 79, in _parse_environment_file_for_platform
dependencies.append(parse_python_requirement("pip", manager="conda"))
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\pyproject_toml.py", line 421, in parse_python_requirement
conda_dep_name = normalize_pypi_name(name)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\src_parser\pyproject_toml.py", line 78, in normalize_pypi_name
if cname in get_lookup():
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\lookup.py", line 53, in get_forward_lookup
return LOOKUP_OBJECT.pypi_lookup
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\functools.py", line 993, in __get__
val = self.func(instance)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\conda_lock\lookup.py", line 33, in pypi_lookup
res = requests.get(self._mapping_url)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\[MY USERNAME]\Miniconda3\envs\knime_5.1.0_extension_bundling\lib\site-packages\requests\adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'Une connexion existante a dû être fermée par l’hôte distant', None, 10054, None))
Just in case: The French part of the ConnectionResetError translates to An existing connection was forcibly closed by the remote host
.
Best