question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] [workspaces] workspace install fails on imports() (1.37)

See original GitHub issue

Environment Details

  • Operating System+version: reproduced on debian/bullseye and archlinux
  • Conan version: 1.37+
  • Python version: 3.9.2
  • Default conan configuration and profile

Steps to reproduce

  • Clone this workspace - Bare workspace with 2 projects created by conan new that reproduces the error. I simply added an imports() method to one conanfile. The issue does not occur with conan 1.36 and earlier.
  • Run conan workspace install . -if cmake-build-debug

Logs

Traceback (most recent call last):
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/command.py", line 2176, in run
    method(args[0][1:])
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/command.py", line 1818, in workspace
    self._conan.workspace_install(args.path, args.settings_host, args.options_host,
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/conan_api.py", line 93, in wrapper
    return f(api, *args, **kwargs)
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/conan_api.py", line 523, in workspace_install
    installer.install(deps_graph, remotes, build, update, graph_info.profile_host,
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/installer.py", line 316, in install
    self._build(nodes_by_level, keep_build, root_node, profile_host, profile_build,
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/installer.py", line 438, in _build
    self._handle_node_editable(node, profile_host, profile_build, graph_lock)
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/installer.py", line 519, in _handle_node_editable
    copied_files = run_imports(conanfile)
  File "/home/miso/.local/lib/python3.9/site-packages/conans/client/importer.py", line 76, in run_imports
    mkdir(conanfile.imports_folder)
  File "/home/miso/.local/lib/python3.9/site-packages/conans/util/files.py", line 287, in mkdir
    if os.path.exists(path):
  File "/usr/lib/python3.9/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
burgerkiller79commented, Jul 18, 2021

Hi @memsharded, it works perfectly. Thanks a lot 😃 !

0reactions
bkarpaticommented, Jul 19, 2021

Thanks for picking this up so quickly. I can also confirm that packages can be imported from the workspace once again with the fix.

And to answer your question, moving to 1.39 should be no problem for us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

expected workspace package to exist · Issue #7807 · yarnpkg ...
I had this problem and could solve it by setting all corresponding packages in all workspaces to the same version. 1
Read more >
Import workspace failing with error - Oracle Communities
I exported the workspace from DEV into a script and tried importing it using the UI (Home--> Manage Workspaces-->.Import workspaces). It fails with...
Read more >
Installation issues - Google Workspace Admin Help
Here's how to troubleshoot problems you might have when installing Google Workspace Sync for Microsoft Outlook (GWSMO). Download & installation issues | Error...
Read more >
Command yarn import error: This package doesn't seem to be ...
The problem in here seems to be an existing yarn.lock file inside of one of the workspaces. Deleting it solves the problem.
Read more >
Changelog — conan 1.56.0 documentation
Fix: conan user -r=remote_name showed all users for all remotes, not the one given. BugFix: Python reuse code failing to import module in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found