{"id":946,"hash":"228fa681669ba0dc429247be18bb1044c549b718a84d5ef439090495d247d239","pattern":"TypeError: attrib() got an unexpected keyword argument &#39;convert&#39;","full_message":"This error occurred during automated testing of a python project on the CI server using pytest. I'm using pytest==4.0.2. This error only just started to occur, previous pipelines seem to work fine.\n\nThe full error:\n\nFile \"/usr/local/lib/python3.7/site-packages/_pytest/tmpdir.py\", line 35, in TempPathFactory\n    lambda p: Path(os.path.abspath(six.text_type(p)))\nTypeError: attrib() got an unexpected keyword argument 'convert'","ecosystem":"pypi","package_name":"pytest","package_version":null,"solution":"pytest seems to have the package attrs as a dependency. attrs==19.2.0 was released around 2019-10-01 17:00 UTC. This seems to cause the problem above.\n\nSwitching back to attrs==19.1.0 fixes the problem. Just do the following:\n\npip install attrs==19.1.0\n\nNOTE: I expect that the issue will be resolved either by attrs or pytest soon by releasing a new version. So this fix should only be temporary.\n\nFrom the comments: This error does not occur on the newer versions of pytest i.e. pytest==5.2.0","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/58189683/typeerror-attrib-got-an-unexpected-keyword-argument-convert","votes":84,"created_at":"2026-04-19T04:52:04.240876+00:00","updated_at":"2026-04-19T04:52:04.240876+00:00"}