-
-
Notifications
You must be signed in to change notification settings - Fork 590
TypeError: attrib() got an unexpected keyword argument 'converter' #449
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
Comments
Possibly related to pytest-dev/pytest#3280 or pytest-dev/pytest#3228. The environments:
Very similar. Perhaps has to do with how pytest is installed? Locally, I'm using conda. |
Looking further, likely related to this library: https://github.com/python-attrs/attrs |
Your attrs version is too old. It used to be convert which is now deprecated and called converter instead |
@dhimmel Try re-running your build now and see if it still fails? Will close this since jsonschema's own test suite is passing here so I'm pretty sure the bug would be elsewhere, but leave a comment if you have any issues. |
Ah I see Okay I am using jsonschema 2.6.0 locally (latest version on PyPI). It looks like failed Travis build used jsonschema 3.0.0a1 and attrs 18.1.0. Let me wipe the Travis pip cache and rerun. |
That did not fix. However, I switched to installing the manubot package on Travis using I believe |
Yeah setup.py install hasn't been a great way to install things for awhile
-- definitely go for pip. Glad you got it working.
…On Wed, Aug 8, 2018, 16:53 Daniel Himmelstein ***@***.***> wrote:
Let me wipe the Travis pip cache and rerun.
That did not fix. However, I switched to installing the manubot package on
Travis using pip install . rather than python setup.py install in
***@***.***
<manubot/manubot@ec10ec6>.
The new Travis build
<https://travis-ci.org/greenelab/manubot/builds/413590031#L482> passed!
I believe python setup.py install was using easy_install rather than pip,
but not sure why this would cause the outdated version of attrs when it
claimed to be installing 18.1.0. Anyways, I'm happy since the build is
passing, so not likely to dig further unless this issue reappears.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#449 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUIXkYaMNkoutNQIg4v7ptbl5bPvZ84ks5uOu1QgaJpZM4Vy-J9>
.
|
Refs manubot#47 CSL: replace arxiv_id with archive_location Travis: install package using pip Attempt to fix python-jsonschema/jsonschema#449 --prune-csl option for manubot cite Only remove a single additional property sub_error Workaround the effect of citation-style-language/schema#154 Switch to dhimmel/schema CSL JSON Move validation to remove_jsonschema_errors Test CSL pruning Improve CSL pruning documentation Default to pruning unless --bad-csl flag supplied DOI CSL retriever: use shortDOI for URL Switch CSL pruning logging to DEBUG Update manubot cite help in README arxiv citeproc: use int for date-parts
Prune CSL Items to validate JSON schema Refs manubot#47 CSL: replace arxiv_id with archive_location Travis: install package using pip Attempt to fix python-jsonschema/jsonschema#449 --prune-csl option for manubot cite Only remove a single additional property sub_error Workaround the effect of citation-style-language/schema#154 Switch to dhimmel/schema CSL JSON Move validation to remove_jsonschema_errors Test CSL pruning Improve CSL pruning documentation Default to pruning unless --bad-csl flag supplied DOI CSL retriever: use shortDOI for URL Switch CSL pruning logging to DEBUG Update manubot cite help in README arxiv citeproc: use int for date-parts
Prune CSL Items to validate JSON schema Refs manubot#47 CSL: replace arxiv_id with archive_location Travis: install package using pip Attempt to fix python-jsonschema/jsonschema#449 --prune-csl option for manubot cite Only remove a single additional property sub_error Workaround the effect of citation-style-language/schema#154 Switch to dhimmel/schema CSL JSON Move validation to remove_jsonschema_errors Test CSL pruning Improve CSL pruning documentation Default to pruning unless --bad-csl flag supplied DOI CSL retriever: use shortDOI for URL Switch CSL pruning logging to DEBUG Update manubot cite help in README arxiv citeproc: use int for date-parts
Prune CSL Items to validate JSON schema Refs manubot#47 CSL: replace arxiv_id with archive_location Travis: install package using pip Attempt to fix python-jsonschema/jsonschema#449 --prune-csl option for manubot cite Only remove a single additional property sub_error Workaround the effect of citation-style-language/schema#154 Switch to dhimmel/schema CSL JSON Move validation to remove_jsonschema_errors Test CSL pruning Improve CSL pruning documentation Default to pruning unless --bad-csl flag supplied DOI CSL retriever: use shortDOI for URL Switch CSL pruning logging to DEBUG Update manubot cite help in README arxiv citeproc: use int for date-parts
[This](python-jsonschema/jsonschema#449) suggests the issue might be related to minimum requirements for attrs module causing the problem. The specific error matches. There's a later suggestion about Travis badly using setup.py/easytools instead of pip install being a culprit, but I'll try this first.
This fixes this pytest error: pytest --flake8 --doctest-modules lsstprojectmeta tests Traceback (most recent call last): File "/home/travis/virtualenv/python3.6.3/bin/pytest", line 7, in <module> from pytest import main File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pytest.py", line 14, in <module> from _pytest.fixtures import fillfixtures as _fillfuncargs File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/fixtures.py", line 971, in <module> class FixtureFunctionMarker(object): File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/fixtures.py", line 973, in FixtureFunctionMarker params = attr.ib(converter=attr.converters.optional(tuple)) TypeError: attrib() got an unexpected keyword argument 'converter' make: *** [test] Error 1 The solution is discussed in python-jsonschema/jsonschema#449
This fixes this pytest error: pytest --flake8 --doctest-modules lsstprojectmeta tests Traceback (most recent call last): File "/home/travis/virtualenv/python3.6.3/bin/pytest", line 7, in <module> from pytest import main File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pytest.py", line 14, in <module> from _pytest.fixtures import fillfixtures as _fillfuncargs File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/fixtures.py", line 971, in <module> class FixtureFunctionMarker(object): File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/fixtures.py", line 973, in FixtureFunctionMarker params = attr.ib(converter=attr.converters.optional(tuple)) TypeError: attrib() got an unexpected keyword argument 'converter' make: *** [test] Error 1 The solution is discussed in python-jsonschema/jsonschema#449
…e with travis default version as per python-jsonschema/jsonschema#449
Fixes pytest breakage on Python 3.6 in Travis. See also python-jsonschema/jsonschema#449 Signed-off-by: Jan Kiszka <[email protected]>
Fixes pytest breakage on Python 3.6 in Travis. See also python-jsonschema/jsonschema#449 Signed-off-by: Jan Kiszka <[email protected]>
In a Travis CI linux build on Python 3.6, I am getting an odd error:
The errors occurs in the following line of jsonschema:
https://github.com/Julian/jsonschema/blob/bb92111a85c981d14788257ebc0885f272b17e40/jsonschema/_types.py#L64
Windows builds passed. These builds are for manubot/manubot@34de1a6 of manubot/manubot#49.
Interestingly, the tests pass locally for me on Linux. From the test log, it seems that the error is being triggered upon import. Possibly related to pytest.
The text was updated successfully, but these errors were encountered: