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.

AttributeError : EmptyConstraint object has no attribute allows

See original GitHub issue
  • 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).
  • Linux Pop!_OS 21.04
  • Poetry 1.1.7
[tool.poetry.dependencies]
python = "^3.8"
click = "*"
python-dotenv = "*"
pandas = "*"
requests = "*"
pydantic = "*"
sqlalchemy = "*"

[tool.poetry.dev-dependencies]
pytest = "^6.2.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
skip-string-normalization = true

Issue

image

Tried both with python3.8 and python3.9 resulting in this same error.

AttributeError

  'EmptyConstraint' object has no attribute 'allows'

  at ~/anaconda3/envs/py38/lib/python3.8/site-packages/poetry/core/version/markers.py:291 in validate
      287│ 
      288│         if self._name not in environment:
      289│             return True
      290│ 
    → 291│         return self._constraint.allows(self._parser(environment[self._name]))
      292│ 
      293│     def without_extras(self):  # type: () -> MarkerTypes
      294│         return self.exclude("extra")
      295│ 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:39
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
KyleKingcommented, Aug 18, 2021

Seems to be an issue with SQLAlchemy 1.4.23 that was released ~3 hours ago. Can someone open an issue with them if not already? After work, I can submit an issue otherwise

A temporary workaround is pinning to 1.4.22 (sqlalchemy="1.4.22")

9reactions
KeksTheAllmightycommented, Aug 18, 2021

the problem seems to be with the newest sqlalchemy in my case …

Read more comments on GitHub >

github_iconTop Results From Across the Web

`poetry update` AttributeError: 'EmptyConstraint' object has no ...
As an aside, updating to Poetry 1.1.8 fixed the AttributeError: 'EmptyConstraint' object has no attribute 'allows' error for me.
Read more >
'EmptyConstraint' object has no 'allows' Attribute error fix? - Replit
Updating dependencies. Resolving dependencies... Writing lock file. AttributeError. 'EmptyConstraint' object has no attribute 'allows'.
Read more >
'EmptyConstraint' object has no 'allows' Attribute error fix?
Updating dependencies. Resolving dependencies... Writing lock file. AttributeError. 'EmptyConstraint' object has no attribute 'allows'.
Read more >
'EmptyConstraint' object has no attribute 'min' with pytest and ...
[x] I have searched the issues of this repo and believe that this is not a duplicate. [x] If an exception occurs when...
Read more >
Installing SQLAlchemy with Poetry causes an AttributeErrorr
I tried fl_'s answer but poetry self update itself failed for me with an error saying: ModuleNotFoundError: No module named 'poetry.console'.
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