Conan 2 Error: object of type NoneType has no len(). While computing necessary packages
I could use the Conan 2 package registry successfully for some months (and thank you all for all the work you have done !).
But now, I encounter this error during a `conan install`:
```shell
ERROR: object of type 'NoneType' has no len(). [Remote: gitlab]
```
Conan version: 2.23.0.
Here is the output from `conan install -vtrace ...`:
```shell
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
os.distribution=ubuntu-24.04
qt/6.*:compiler.cppstd=gnu17
[options]
boost/*:header_only=True
qt/5.*:gui=True
qt/5.*:qtserialport=True
qt/5.*:shared=True
qt/5.*:widgets=True
qt/5.*:with_glib=False
qt/5.*:with_mysql=False
qt/5.*:with_odbc=True
qt/5.*:with_pq=True
qt/5.*:with_sqlite3=True
qt/5.*:with_vulkan=False
qt/6.*:gui=True
qt/6.*:qt5compat=True
qt/6.*:qtserialport=True
qt/6.*:shared=True
qt/6.*:widgets=True
qt/6.*:with_glib=False
qt/6.*:with_mysql=False
qt/6.*:with_odbc=True
qt/6.*:with_pq=True
qt/6.*:with_sqlite3=True
qt/6.*:with_vulkan=False
[buildenv]
CC=gcc-13
CXX=g++-13
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[buildenv]
CC=gcc-13
CXX=g++-13
======== Computing dependency graph ========
qt/6.8.3: Qt6: Removing qtquickcontrols2 option as it is not in the module tree for this version, or is marked as obsolete or ignore
qt/6.8.3: qt6: requested modules ['qt5compat', 'qtserialport']
qt/6.8.3: qt6: required_modules modules ['qtbase', 'qtdeclarative']
qt/6.8.3: qt6 removing convenience option: essential_modules, see individual module options
qt/6.8.3: qt6 removing convenience option: addon_modules, see individual module options
qt/6.8.3: qt6 removing convenience option: deprecated_modules, see individual module options
qt/6.8.3: qt6 removing convenience option: preview_modules, see individual module options
qt/6.8.3: qt6 option: ('cross_compile', None)
qt/6.8.3: qt6 option: ('device', None)
qt/6.8.3: qt6 option: ('disabled_features', '')
qt/6.8.3: qt6 option: ('gui', 'True')
qt/6.8.3: qt6 option: ('multiconfiguration', 'False')
qt/6.8.3: qt6 option: ('opengl', 'desktop')
qt/6.8.3: qt6 option: ('openssl', 'True')
qt/6.8.3: qt6 option: ('qt3d', 'False')
qt/6.8.3: qt6 option: ('qt5compat', 'True')
qt/6.8.3: qt6 option: ('qtactiveqt', 'False')
qt/6.8.3: qt6 option: ('qtcharts', 'False')
qt/6.8.3: qt6 option: ('qtcoap', 'False')
qt/6.8.3: qt6 option: ('qtconnectivity', 'False')
qt/6.8.3: qt6 option: ('qtdatavis3d', 'False')
qt/6.8.3: qt6 option: ('qtdeclarative', 'True')
qt/6.8.3: qt6 option: ('qtdoc', 'False')
qt/6.8.3: qt6 option: ('qtgraphs', 'False')
qt/6.8.3: qt6 option: ('qtgrpc', 'False')
qt/6.8.3: qt6 option: ('qthttpserver', 'False')
qt/6.8.3: qt6 option: ('qtimageformats', 'False')
qt/6.8.3: qt6 option: ('qtlanguageserver', 'False')
qt/6.8.3: qt6 option: ('qtlocation', 'False')
qt/6.8.3: qt6 option: ('qtlottie', 'False')
qt/6.8.3: qt6 option: ('qtmqtt', 'False')
qt/6.8.3: qt6 option: ('qtmultimedia', 'False')
qt/6.8.3: qt6 option: ('qtnetworkauth', 'False')
qt/6.8.3: qt6 option: ('qtopcua', 'False')
qt/6.8.3: qt6 option: ('qtpositioning', 'False')
qt/6.8.3: qt6 option: ('qtquick3d', 'False')
qt/6.8.3: qt6 option: ('qtquick3dphysics', 'False')
qt/6.8.3: qt6 option: ('qtquickeffectmaker', 'False')
qt/6.8.3: qt6 option: ('qtquicktimeline', 'False')
qt/6.8.3: qt6 option: ('qtremoteobjects', 'False')
qt/6.8.3: qt6 option: ('qtscxml', 'False')
qt/6.8.3: qt6 option: ('qtsensors', 'False')
qt/6.8.3: qt6 option: ('qtserialbus', 'False')
qt/6.8.3: qt6 option: ('qtserialport', 'True')
qt/6.8.3: qt6 option: ('qtshadertools', 'False')
qt/6.8.3: qt6 option: ('qtspeech', 'False')
qt/6.8.3: qt6 option: ('qtsvg', 'False')
qt/6.8.3: qt6 option: ('qttools', 'False')
qt/6.8.3: qt6 option: ('qttranslations', 'False')
qt/6.8.3: qt6 option: ('qtvirtualkeyboard', 'False')
qt/6.8.3: qt6 option: ('qtwayland', 'False')
qt/6.8.3: qt6 option: ('qtwebchannel', 'False')
qt/6.8.3: qt6 option: ('qtwebengine', 'False')
qt/6.8.3: qt6 option: ('qtwebsockets', 'False')
qt/6.8.3: qt6 option: ('qtwebview', 'False')
qt/6.8.3: qt6 option: ('shared', 'True')
qt/6.8.3: qt6 option: ('sysroot', None)
qt/6.8.3: qt6 option: ('widgets', 'True')
qt/6.8.3: qt6 option: ('with_brotli', 'True')
qt/6.8.3: qt6 option: ('with_dbus', 'False')
qt/6.8.3: qt6 option: ('with_doubleconversion', 'True')
qt/6.8.3: qt6 option: ('with_egl', 'False')
qt/6.8.3: qt6 option: ('with_fontconfig', 'True')
qt/6.8.3: qt6 option: ('with_freetype', 'True')
qt/6.8.3: qt6 option: ('with_glib', 'False')
qt/6.8.3: qt6 option: ('with_gssapi', 'False')
qt/6.8.3: qt6 option: ('with_harfbuzz', 'True')
qt/6.8.3: qt6 option: ('with_icu', 'True')
qt/6.8.3: qt6 option: ('with_libjpeg', 'False')
qt/6.8.3: qt6 option: ('with_libpng', 'True')
qt/6.8.3: qt6 option: ('with_md4c', 'True')
qt/6.8.3: qt6 option: ('with_mysql', 'False')
qt/6.8.3: qt6 option: ('with_odbc', 'True')
qt/6.8.3: qt6 option: ('with_pcre2', 'True')
qt/6.8.3: qt6 option: ('with_pq', 'True')
qt/6.8.3: qt6 option: ('with_sqlite3', 'True')
qt/6.8.3: qt6 option: ('with_vulkan', 'False')
qt/6.8.3: qt6 option: ('with_x11', 'True')
qt/6.8.3: qt6 option: ('with_zstd', 'False')
Graph root
conanfile.py (mdtcmakemodules/None): /home/philippe/dev/mdt-cmake-modules/conanfile.py
Requirements
autoconf/2.71#51077f068e61700d65bb05541ea1e4b0 - Cache
automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f - Cache
brotli/1.1.0#3f631ef77008f7b5eb388780116371a3 - Cache
bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321 - Cache
double-conversion/3.3.0#6ad026cf92c316c476919f7f152072d7 - Cache
elfutils/0.190#8e8c47bd9b2578e29a0341b09b977be8 - Cache
expat/2.7.3#f529802a90f0758a01f498a18f8c657b - Cache
fontconfig/2.15.0#c2e302ca62cd3af069ab7dca1525903f - Cache
freetype/2.13.2#18656f7a6d52256a930f1cbd79f1509d - Cache
glib/2.78.3#ab1631d8312dedc7e1dd3706e568ed6d - Cache
harfbuzz/11.4.1#e0ad6362902b15074ff3a8c263a27a57 - Cache
icu/74.2#aa0ef3990c0db8dc369d8f0e8399714a - Cache
libffi/3.4.8#a045c00fb26779635e3bed40e80c5254 - Cache
libiconv/1.17#1e65319e945f2d31941a9d28cc13c058 - Cache
libmount/2.39.2#64850679fa9d5ead878e5076b0cab2a8 - Cache
libpng/1.6.53#a55f084366cd7b81cfce80327507913e - Cache
libpq/15.4#eedc1c159c38316ab0e8d38dbe2b5d62 - Cache
libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4 - Cache
libtool/2.4.7#14e7739cc128bc1623d2ed318008e47e - Cache
libxml2/2.15.0#8d852c332225c0aa07a723fba8bcd0f5 - Cache
m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
md4c/0.4.8#27e9caa979916b4eec30472fec9e177b - Cache
odbc/2.3.11#84d32d803c970271eb2fc58d3e3cc2b5 - Cache
opengl/system#cfcf523b9d2bad75cbf377f56562634c - Cache
openssl/3.6.0#89e8af1d4a21afcac0557079d23d8890 - Cache
pcre2/10.42#9a35f5089feb875ec61a38eca364ce77 - Cache
qt/6.8.3#60506664babbf87e11cd40c3f23f11d0 - Cache
sqlite3/3.51.0#66aa11eabd0e34954c5c1c061ad44abe - Cache
wayland/1.22.0#52f5e560014b3a69ae11173b45031ae1 - Cache
xkbcommon/1.5.0#b0c188152e83df50b6762c4f49479c74 - Cache
xkeyboard-config/system#74aea985b91f987b93b220b44963d7ed - Cache
xorg/system#98f82cb669e4ebc6b4d9d8a4f3f1faf4 - Cache
xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7 - Cache
zlib/1.3.1#cac0f6daea041b0ccf42934163defb20 - Cache
zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4 - Cache
Build requirements
autoconf/2.71#51077f068e61700d65bb05541ea1e4b0 - Cache
automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f - Cache
bison/3.8.2#c3490cbe0078b6fd3eb4cf5ed64144dc - Cache
bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321 - Cache
cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76 - Cache
cmake/4.2.0#ae0a44f44a1ef9ab68fd4b3e9a1f8671 - Cache
elfutils/0.190#8e8c47bd9b2578e29a0341b09b977be8 - Cache
expat/2.7.3#f529802a90f0758a01f498a18f8c657b - Cache
flex/2.6.4#efa781fc5088b47c895bd4eef6911f2e - Cache
gettext/0.22.5#4705a1582f4a611eadb15d0417427993 - Cache
glib/2.78.3#ab1631d8312dedc7e1dd3706e568ed6d - Cache
gnu-config/cci.20210814#466e9d4d7779e1c142443f7ea44b4284 - Cache
gperf/3.1#a7afdf8f7cccdc2dcd4d962370c33d4f - Cache
libffi/3.4.8#a045c00fb26779635e3bed40e80c5254 - Cache
libiconv/1.17#1e65319e945f2d31941a9d28cc13c058 - Cache
libmount/2.39.2#64850679fa9d5ead878e5076b0cab2a8 - Cache
libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4 - Cache
libxml2/2.15.0#8d852c332225c0aa07a723fba8bcd0f5 - Cache
m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
meson/1.3.2#26ce8a76a36cc275cdfee1d757bc6561 - Cache
meson/1.9.1#abbc783cd297bedce14581b4aec060b8 - Cache
ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb - Cache
pcre2/10.42#9a35f5089feb875ec61a38eca364ce77 - Cache
pkgconf/2.1.0#21f96520faf7660b99f872e956d2ac13 - Cache
pkgconf/2.2.0#4ac315b50ef734072b00ff3aacbf52bf - Cache
pkgconf/2.5.1#93c2051284cba1279494a43a4fcfeae2 - Cache
wayland/1.22.0#52f5e560014b3a69ae11173b45031ae1 - Cache
wayland-protocols/1.33#b349fc274b8ef9ba525dda076385f3fd - Cache
xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7 - Cache
zlib/1.3.1#cac0f6daea041b0ccf42934163defb20 - Cache
zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4 - Cache
Resolved version ranges
cmake/[>=3.18]: cmake/4.2.0
cmake/[>=3.21.1 <4]: cmake/3.31.10
expat/[>=2.6.2 <3]: expat/2.7.3
harfbuzz/[>=8.3.0]: harfbuzz/11.4.1
libffi/[>=3.4.4 <4]: libffi/3.4.8
libpng/[>=1.6 <2]: libpng/1.6.53
libxml2/[>=2.12.5 <3]: libxml2/2.15.0
meson/[>=1.2.2 <2]: meson/1.9.1
meson/[>=1.2.3 <2]: meson/1.9.1
meson/[>=1.3.1 <2]: meson/1.9.1
meson/[>=1.3.2 <2]: meson/1.9.1
meson/[>=1.4.0 <2]: meson/1.9.1
ninja/[>=1.10.2 <2]: ninja/1.13.2
ninja/[>=1.12 <2]: ninja/1.13.2
openssl/[>=1.1 <4]: openssl/3.6.0
pkgconf/[>=2.1.0 <3]: pkgconf/2.5.1
pkgconf/[>=2.2 <3]: pkgconf/2.5.1
sqlite3/[>=3.45.0 <4]: sqlite3/3.51.0
xz_utils/[>=5.4.5 <6]: xz_utils/5.8.1
zlib/[>=1.2.11 <2]: zlib/1.3.1
zlib/[>=1.3.1 <2]: zlib/1.3.1
zstd/[~1.5]: zstd/1.5.7
======== Computing necessary packages ========
Connecting to remote 'gitlab' anonymously
HttpRequest: get: https://gitlab.com/api/v4/projects/25668674/packages/conan/v1/ping
HttpRequest: get: https://gitlab.com/api/v4/projects/25668674/packages/conan/v2/conans/brotli/1.1.0/_/_/revisions/3f631ef77008f7b5eb388780116371a3/packages/a53144ef74ce8a03e552a875f7763e23cbd9afe1/latest
Traceback (most recent call last):
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/remote_manager.py", line 296, in get_latest_package_revision
result = cached_method[pref]
~~~~~~~~~~~~~^^^^^^
KeyError: brotli/1.1.0#3f631ef77008f7b5eb388780116371a3%1765622195.204:a53144ef74ce8a03e552a875f7763e23cbd9afe1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/remote_manager.py", line 324, in _call_remote
return self._auth_manager.call_rest_api_method(remote, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/auth_manager.py", line 60, in call_rest_api_method
ret = getattr(rest_client, method_name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/rest_client.py", line 93, in get_latest_package_reference
return self._get_api().get_latest_package_reference(pref, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/rest_client_v2.py", line 468, in get_latest_package_reference
remote_pref.timestamp = from_iso8601_to_timestamp(data.get("time"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/util/dates.py", line 19, in from_iso8601_to_timestamp
datetime_time = _from_iso8601_to_datetime(iso_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/util/dates.py", line 14, in _from_iso8601_to_datetime
return parser.isoparse(iso_str)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/dateutil/parser/isoparser.py", line 37, in func
return f(self, str_in, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/dateutil/parser/isoparser.py", line 134, in isoparse
components, pos = self._parse_isodate(dt_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/dateutil/parser/isoparser.py", line 208, in _parse_isodate
return self._parse_isodate_common(dt_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/dateutil/parser/isoparser.py", line 213, in _parse_isodate_common
len_str = len(dt_str)
^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/cli/cli.py", line 194, in run
command.run(self._conan_api, args[0][1:])
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/cli/command.py", line 197, in run
info = self._method(conan_api, parser, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/cli/commands/install.py", line 48, in install
deps_graph, lockfile, install_error = _run_install_command(conan_api, args, cwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/cli/commands/install.py", line 92, in _run_install_command
gapi.analyze_binaries(deps_graph, args.build, remotes, update=args.update, lockfile=lockfile)
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/api/subapi/graph.py", line 216, in analyze_binaries
binaries_analyzer.evaluate_graph(graph, build_mode, lockfile, remotes, update,
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 537, in evaluate_graph
_evaluate_single(pref_nodes[0])
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 521, in _evaluate_single
self._evaluate_node(n, mode, remotes, update)
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 320, in _evaluate_node
self._process_node(node, build_mode, remotes, update)
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 397, in _process_node
self._evaluate_download(node, remotes, update)
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 429, in _evaluate_download
self._get_package_from_remotes(node, remotes, update)
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/graph/graph_binaries.py", line 82, in _get_package_from_remotes
latest_pref = self._remote_manager.get_latest_package_revision(pref, r, info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/remote_manager.py", line 299, in get_latest_package_revision
result = self._call_remote(remote, "get_latest_package_reference", pref,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philippe/.local/share/pipx/venvs/conan/lib/python3.12/site-packages/conan/internal/rest/remote_manager.py", line 336, in _call_remote
raise ConanException(exc, remote=remote)
conan.errors.ConanException: object of type 'NoneType' has no len(). [Remote: gitlab]
ERROR: object of type 'NoneType' has no len(). [Remote: gitlab]
```
issue