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

[ValueError] Array has mixed types elements, on "poetry install" #904

Closed
2 of 3 tasks
mthuurne opened this issue Feb 20, 2019 · 4 comments
Closed
2 of 3 tasks

[ValueError] Array has mixed types elements, on "poetry install" #904

mthuurne opened this issue Feb 20, 2019 · 4 comments

Comments

@mthuurne
Copy link

  • I am on the latest Poetry version.
    I am on the latest preview release, not the latest stable release.
  • 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).
  • OS version and name: Debian GNU/Linux 9 (stretch)
  • Poetry version: 1.0.0a2
  • Link of a Gist with the contents of your pyproject.toml file: pyproject.toml

Issue

I was trying to use the new feature that creates a virtualenv with a different Python version (3.5.3) than the system default (2.7.13). However, poetry install breaks with a ValueError in tomlkit.

Steps I took:

$ poetry self:update --preview
$ git clone https://github.com/boxingbeetle/softfab.git
$ cd softfab
$ poetry env use python3
$ poetry install

Debug output:

$ poetry install -vvv
Using virtualenv: /home/factory/.cache/pypoetry/virtualenvs/softfab-IfPgbchb-py3.5
Updating dependencies
Resolving dependencies...
   1: fact: softfab is 3.0.0-pre1
(snip)
   1: selecting pyopenssl (19.0.0)
   1: derived: cryptography (>=2.3)
   1: fact: cryptography (2.5) depends on asn1crypto (>=0.21.0)
   1: fact: cryptography (2.5) depends on six (>=1.4.1)
   1: fact: cryptography (2.5) depends on cffi (>=1.8,<1.11.3 || >1.11.3)
   1: selecting cryptography (2.5)
   1: derived: asn1crypto (>=0.21.0)
   1: selecting asn1crypto (0.24.0)
   1: Version solving took 3.593 seconds.
   1: Tried 1 solutions.


Package operations: 39 installs, 20 updates, 0 removals, 2 skipped

[ValueError]
Array has mixed types elements

Traceback (most recent call last):
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/clikit/api/command/command.py", line 112, in handle
    status_code = self._do_handle(args, io)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/clikit/api/command/command.py", line 160, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/home/factory/.poetry/lib/poetry/console/commands/install.py", line 53, in handle
    return_code = installer.run()
  File "/home/factory/.poetry/lib/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/home/factory/.poetry/lib/poetry/installation/installer.py", line 276, in _do_install
    self._package, local_repo.packages
  File "/home/factory/.poetry/lib/poetry/packages/locker.py", line 149, in set_lock_data
    lock['package'] = packages
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/container.py", line 528, in __setitem__
    self.append(key, value)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/container.py", line 91, in append
    item = _item(item)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/items.py", line 61, in item
    i = item(_v)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/items.py", line 45, in item
    val[k] = item(v, _parent=val)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/items.py", line 69, in item
    a.append(v)
  File "/home/factory/.poetry/lib/poetry/_vendor/py2.7/tomlkit/items.py", line 683, in append
    raise ValueError('Array has mixed types elements')
@fsworld009
Copy link

fsworld009 commented Mar 29, 2019

Same error when installing stripe = '2.15.0', its setup.py is quite complex I think that's the reason: https://github.com/stripe/stripe-python/blob/v2.15.0/setup.py

Even if I checked out the code locally and disabled install_requires, it still fails on this message:

[RuntimeError]                                           
Unable to retrieve the package version for ../stripe-python

I think it would be nice if we have a option to skip parsing setup.py for packages like this, and let us manually specify sub-dependencies instead (or manually specify a version to a local/git package), not sure if this is possible, though.

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@stale
Copy link

stale bot commented Nov 20, 2019

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

@stale stale bot closed this as completed Nov 20, 2019
Copy link

github-actions bot commented Mar 3, 2024

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 Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants