cookie icon indicating copy to clipboard operation
cookie copied to clipboard

AttributeError: 'float' object has no attribute 'split'

Open DimitriPapadopoulos opened this issue 4 months ago • 1 comments

Online checking of sphinx-doc/sphinx generates this error:

Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 468, in eval_code
    .run(globals, locals)
     ^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/_pyodide/_base.py", line 310, in run
    coroutine = eval(self.code, globals, locals)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 9, in 
  File "/lib/python3.11/site-packages/repo_review/processor.py", line 214, in process
    result = apply_fixtures({"name": name, **fixtures}, tasks[name].check)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/repo_review/fixtures.py", line 106, in apply_fixtures
    return func(**kwargs)
           ^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/sp_repo_review/checks/pyproject.py", line 92, in check
    return "minversion" in options and int(options["minversion"].split(".")[0]) >= 6
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'split'

That's because of this:

[tool.pytest.ini_options]
minversion = 6.0

I'll fix it with minversion = "6.0". Nevertheless, repo-review should print an error, not crash.

DimitriPapadopoulos avatar Apr 09 '24 07:04 DimitriPapadopoulos

Already fixed in https://github.com/scientific-python/cookie/pull/398, not released yet though.

henryiii avatar Apr 09 '24 08:04 henryiii

Now in a release!

henryiii avatar Apr 24 '24 20:04 henryiii