To help us debug your issue please explain:
Macos homebrew installed conan
$ conan --version
Conan version 1.4.4
$ conan search sdl2
Traceback (most recent call last):
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/remote_registry.py", line 66, in _load
contents = load(self._filename)
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/util/files.py", line 168, in load
with open(path, 'rb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/XXXX/.conan/registry.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/command.py", line 1182, in run
method(args[0][1:])
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/command.py", line 861, in search
all_remotes_search = ("all" not in (r.name for r in remote_registry.remotes) and
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/remote_registry.py", line 86, in remotes
return list(self._remote_dict.values())
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/remote_registry.py", line 99, in _remote_dict
remotes, _ = self._load()
File "/usr/local/Cellar/conan/1.4.4/libexec/lib/python3.6/site-packages/conans/client/remote_registry.py", line 68, in _load
self._output.warn("Remotes registry file missing, creating default one in %s"
AttributeError: 'NoneType' object has no attribute 'warn'
ERROR: 'NoneType' object has no attribute 'warn'
Yes, indeed a bug:
L860 command.py:
remote_registry = RemoteRegistry(self._client_cache.registry, None)
We will fix it for next release 1.5. In the meantime, please use any other command after installation, rather than search, e.g.
$ #install conan
$ conan remote list
$ conan search sdl2
Only necessary to run conan remote list the first time you run conan after installation in a new machine.
Thanks very much for reporting!
Also note that by default, conan searches in the conan local cache, which would be empty. There are no official packages yet in conan-cente for SDL, ,
$ conan search sdl2 # local cache, nothing
The bincrafters are working in some recipe for SDL2, check it here:
You might read about remotes here: https://docs.conan.io/en/latest/uploading_packages/remotes.html (we are going to improve the docs to add something regarding remotes in the getting started).
Thanks a lot for the help :)
This seemed to work building it for me (in case some random internet visitor comes across this).
conan remote list
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan search -r all sdl2
conan install sdl2/2.0.8@bincrafters/stable --build sdl2
Waiting for merge in #3025 to use new functions of conan_api to solve this
@danimtb It is merged now. You can proceed.
Most helpful comment
Thanks a lot for the help :)
This seemed to work building it for me (in case some random internet visitor comes across this).