conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.22k stars 979 forks source link

TypeError: 'str' object is not callable #4789

Closed kmaragon closed 5 years ago

kmaragon commented 5 years ago

https://github.com/conan-io/conan/blob/862c76acb71e8ab80a36d8ec4f3381224125e1ac/conans/client/graph/graph_binaries.py#L106

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/conans/model/ref.py", line 111, in loads
    _, name, version, user, channel, revision, _ = ConanFileReference.sep_pattern.split(text)
ValueError: not enough values to unpack (expected 7, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/conans/client/command.py", line 376, in install
    ref = ConanFileReference.loads(args.path_or_reference)
  File "/usr/local/lib/python3.6/dist-packages/conans/model/ref.py", line 114, in loads
    "OpenCV/1.0.6@user/stable" % text)
conans.errors.ConanException: Wrong package recipe reference /home/karagon/Documents/Projects/framework-cpp/arcturus/conanfile.py
Write something like OpenCV/1.0.6@user/stable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/conans/client/command.py", line 1570, in run
    method(args[0][1:])
  File "/usr/local/lib/python3.6/dist-packages/conans/client/command.py", line 389, in install
    install_folder=args.install_folder)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 93, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 572, in install
    no_imports=no_imports)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/manager.py", line 60, in install
    self._recorder)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 148, in load_graph
    processed_profile=processed_profile)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 238, in _load_graph
    profile_build_requires, recorder, processed_profile)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 178, in _recurse_build_requires
    binaries_analyzer.evaluate_graph(graph, build_mode, update, remote_name)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_binaries.py", line 213, in evaluate_graph
    self._evaluate_node(node, build_mode, update, evaluated, remote_name)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_binaries.py", line 106, in _evaluate_node
    package_hash = info.recipe_hash()
TypeError: 'str' object is not callable

I'm not sure what the right fix is here. Whether it's fixing some local state from older versions of conan or just use this as a non-function. I modified my local conan python files to use just :

package_hash = info.recipe_hash

And that was enough the problem was solved. This happened simply by running:

conan install -u -b outdated -s xxx -o xxx path/to/my/conan/package/conanfile.py
lasote commented 5 years ago

This is a bug. Thanks for reporting.

memsharded commented 5 years ago

Fixed, will be released in minor release Conan 1.13.2 as soon as possible.