Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError in mixology/incompatibility.py #3491

Closed
3 tasks done
TheButlah opened this issue Dec 14, 2020 · 12 comments
Closed
3 tasks done

AssertionError in mixology/incompatibility.py #3491

TheButlah opened this issue Dec 14, 2020 · 12 comments
Labels
kind/bug Something isn't working as expected

Comments

@TheButlah
Copy link
Contributor

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

An Assertion is failing when attempting to add a project that depends via path on another project. The other projects pyproject.toml is the following:

[build-system]
requires = ["poetry>=1.0.3", "pip>=20.0.2"]
build-backend = "poetry.masonry.api"

[tool.poetry]
name = "robotics"
version = "0.1.0"
description = "SAIC-NY Codebase"
authors = ["Ben Eisner <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.6.1"
pip = "^20.0.2"
numpy = "^1.17"
click = "^7.0"
opencv-python = "^4.2.0"  # 4.2 breaks some code. Fix the code then update.
scipy = "^1.3"
scikit-learn = "^0.21.3"
matplotlib = "^3.1"
apriltag = "^0.0.16"
pyrealsense2 = {version = "^2.35", platform = "!= darwin"}
jupyter = "^1.0"
tqdm = "^4.36"
visdom = "^0.1.8"
h5py = "^2.10"
scikit-image = "^0.16.1"
gym = {version = "^0.15.3", extras = ["atari"]}
cython = "^0.29.13"
probscale = "^0.2.3"
progressbar2 = "^3.47"
ninja = "^1.9"
pathos = "^0.2.5"
transitions = "^0.7.1"
pyqt5 = "^5.13"
pyqtdatavisualization = "^5.13"
pyserial = "^3.4"
plotly = "^4.2"
ray = "^0.8.4"  # Ray==0.7.5 doesn't work on mac - fails pytest --cov
psutil = "^5.6"
pandas = "^0.25.1"
mujoco-py = "^2.0"
wandb = "^0.8.29"
torchvision = "^0.7.0"
Jinja2 = "^2.10.3"
tensorflow = "^2.1.0"
tensorboard = "^2.1.0"
torch = "^1.6.0"
jupyterlab = "^2.1.0"
pillow = "^6.1.0"
open3d = "0.10.0"
chart-studio = "^1.0.0"
dask = {version = "^2.12.0", extras = ["complete"]}
numba = "^0.48.0"
colorama = "^0.4.3"
pyyaml = "^5.3.1"
icc_rt = {version = "^2020.0.133", platform = "!= darwin" }
nbstripout = "^0.3.7"
seaborn = "^0.10.0"
ipympl = "^0.5.6"
polyaxon-cli = "^0.6.1"
dv = "^1.0.8"
polyscope = "^0.1.2"
pytorch-lightning = "^1.0.8"
hydra = "^2.5"
omegaconf = "^2.0.0"
zarr = "^2.4.0"
absl-py = "^0.9.0"
pybullet = "^2.8.1"
speechrecognition = "^3.8.1"
pyaudio = "^0.2.11"
nuscenes-devkit = "^1.0.8"
pyquaternion = "^0.9.5"
cachetools = "^4.1.1"
joblib = "^0.16.0"
ipyplot = "^1.0.5"
imutils = "^0.5.3"
pyrender = "^0.1.43"
networkx = "^2.4"
dgl = "^0.5.1"
snakeviz = "^2.1.0"

[tool.poetry.dev-dependencies]
black = {version = "^19.10b0", allow-prereleases = true}
pytest = "^5.2"
mypy = "^0.770"
pylint = "^2.4"
isort = "^4.3.21"
autoflake = "^1.3.1"
pre-commit = "^2.0.1"
rope = "^0.16.0"
coverage = {extras = ["toml"], version = "^5.1"}
pytest-cov = "^2.8.1"

[tool.coverage.run]
source = ["."]
omit = [".venv/*", "third_party/*", "experimental/*"]


[tool.isort]
skip_glob="third_party/*"

# See black's README for the origin of these settings
multi_line_output=3
include_trailing_comma=true
force_grid_wrap=0
use_parentheses=true
line_length=88

# used for pre-commit hook
known_third_party=["Augmentor", "Cython", "DVS_filter", "OmplPlanning", "OpenGL", "PIL", "PyQt5", "TrajTransform", "TrajectoryPlanner", "absl", "agent", "angles", "apriltag", "click", "cloudpickle", "cv2", "dataclasses", "detectron2", "dpumanet", "dv", "dvs_data", "dvs_utils", "dynamixel_sdk", "event_class", "fvcore", "glfw", "gym", "h5py", "hydra", "ik_solver", "imageio", "ipdb", "jinja2", "kortex_api", "logger", "matplotlib", "metaworld", "moviepy", "mpl_toolkits", "mujoco_interface", "mujoco_py", "numcodecs", "numpy", "omegaconf", "ompl", "open3d", "pandas", "pathos", "plotly", "policy", "polyscope", "probscale", "progressbar", "pumanet", "pycocotools", "pygame", "pyglet", "pylab", "pyntcloud", "pyrealsense2", "pyrender", "pytest", "pytorch_lightning", "pytorch_models", "pytorch_utils", "q_functions", "ray", "rosbag", "rospy", "rules_python", "scipy", "seaborn", "skimage", "sklearn", "sum_tree", "t_embed", "tensorboard", "tensorflow", "thinnet", "torch", "torchvision", "tqdm", "transitions", "trimesh", "ttc_dataset", "unet", "utils", "visdom", "wandb", "zarr"]
@TheButlah TheButlah added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 14, 2020
@sanderland
Copy link

Possibly the same assertionerror appears when your poetry project name is equal to a dependency you are adding: assert len(self._terms) == 2 in __str__ fails.

@smyja
Copy link

smyja commented Nov 4, 2021

Possibly the same assertionerror appears when your poetry project name is equal to a dependency you are adding: assert len(self._terms) == 2 in __str__ fails.

Solved it.

@aterreno
Copy link

same issue, it's the project name. I think this can be closed, @sanderland comment definitely fixes the problem.

@abn abn closed this as completed Apr 27, 2022
@zEdS15B3GCwq
Copy link

zEdS15B3GCwq commented May 31, 2022

same issue, it's the project name. I think this can be closed, @sanderland comment definitely fixes the problem.

Except, the error message is totally unhelpful in finding out what the problem is. I think it should at least give a hint as to what the problem is and that the project should be renamed. Using assert instead of properly checking the inputs might be better to avoid, in any case.

@benedikt-bartscher
Copy link

I just ran into this. @zEdS15B3GCwq is absolutly right, the error message is pretty bad and should be improved.

@SamuelMS
Copy link

Yeah, this error is pretty unhelpful. An error message along these lines would be much better, IMO:

"Your project name <name> is the same as that of one of your dependencies, which will prevent Python's module resolution from working as intended. Please rename your project or remove the dependency and try again."

@Baksalyar
Copy link

The problem is still present :(

@yuletide
Copy link

Just ran into this myself

@Eifoen
Copy link

Eifoen commented Apr 20, 2023

This issue seems to be triggered, if the package you want to add is named like the folder the poetry project resides in.

In my case it was diagrams

@avysk
Copy link
Contributor

avysk commented Apr 22, 2023

And this bug is closed why? It is still present; the error message is still completely meaningless.

@sherwoac
Copy link

short story long:

rename your poetry environment so it doesn't match the package name.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests