Opened 3 days ago

Closed 23 hours ago

#71290 closed defect (invalid)

py312-scipy @1.14.1: TypeError: expected string or bytes-like object, got 'NoneType'

Reported by: brolcz Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.10.4
Keywords: Cc: reneeotten (Renee Otten), Schamschula (Marius Schamschula)
Port: py312-scipy

Description

When I try to install this port, it fails. I am including the log file below. Thank you.

I am using a macbook pro, mac os monterey 12.7.6.

Attachments (1)

main.log (128.5 KB) - added by brolcz 3 days ago.

Download all attachments as: .zip

Change History (11)

Changed 3 days ago by brolcz

Attachment: main.log added

comment:1 Changed 3 days ago by ryandesign (Ryan Carsten Schmidt)

Cc: reneeotten@… removed
Keywords: michaelld@macports.org removed
Owner: set to michaelld
Status: newassigned
Summary: py312-scipy @1.14.1 install failurepy312-scipy @1.14.1: TypeError: expected string or bytes-like object, got 'NoneType'

The log says the problem is:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/__main__.py", line 178, in _handle_build_error
    yield
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/__main__.py", line 429, in main
    built = build_call(
            ^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/__main__.py", line 238, in build_package
    out = _build(isolation, srcdir, outdir, distribution, config_settings, skip_dependency_check, installer)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/__main__.py", line 172, in _build
    return _build_in_current_env(srcdir, outdir, distribution, config_settings, skip_dependency_check)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/__main__.py", line 151, in _build_in_current_env
    missing = builder.check_dependencies(distribution, config_settings or {})
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/_builder.py", line 243, in check_dependencies
    return {u for d in dependencies for u in check_dependency(d)}
                                             ^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/_util.py", line 59, in check_dependency
    yield from check_dependency(other_req_string, (*ancestral_req_strings, normalised_req_string), req.extras)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/build/_util.py", line 53, in check_dependency
    if req.specifier and not req.specifier.contains(dist.version, prereleases=True):
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/packaging/specifiers.py", line 917, in contains
    item = Version(item)
           ^^^^^^^^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/packaging/version.py", line 200, in __init__
    match = self._regex.search(version)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
ERROR expected string or bytes-like object, got 'NoneType'

comment:2 Changed 2 days ago by jmroot (Joshua Root)

Cc: reneeotten added

comment:3 Changed 2 days ago by ryandesign (Ryan Carsten Schmidt)

Cc: Schamschula added

I see you also filed #71296 for the same problem in a different port (py312-pyerfa). I've closed it as a duplicate of this one because I suspect the problem is not in the ports you're seeing the problem with but with one of their dependencies, and possibly with the specific way that dependency is installed on your system.

I did a Google search for this error and found some results that may provide some insight:

comment:4 Changed 46 hours ago by reneeotten (Renee Otten)

two questions:

  1. are you building in trace-mode? I've seen (seemingly) randomly popping up errors like this. The issue with trace-mode and Python packages (as far as I understand it), is that they will be found but cannot be used. That's what could be happening here; if so, try building without trace mode.
  2. do you see the same problem when building the default variant, in other words without the gcc14 variant?

comment:5 in reply to:  4 Changed 45 hours ago by ryandesign (Ryan Carsten Schmidt)

Replying to reneeotten:

  1. are you building in trace-mode? I've seen (seemingly) randomly popping up errors like this. The issue with trace-mode and Python packages (as far as I understand it), is that they will be found but cannot be used. That's what could be happening here; if so, try building without trace mode.

The log shows trace mode (the -t flag) was not used.

The ticket tracking build failures of python modules when trace mode is used is #69534.

  1. do you see the same problem when building the default variant, in other words without the gcc14 variant?

We usually offer binaries of ports built with default variants, and most likely you will be able to install that binary. To test whether the issue affects the default variants when building on your system, make sure you build from source (use the -s flag).

comment:6 in reply to:  4 Changed 43 hours ago by brolcz

Replying to reneeotten:

two questions:

  1. are you building in trace-mode? I've seen (seemingly) randomly popping up errors like this. The issue with trace-mode and Python packages (as far as I understand it), is that they will be found but cannot be used. That's what could be happening here; if so, try building without trace mode.
  2. do you see the same problem when building the default variant, in other words without the gcc14 variant?

Thanks for the questions.

  1. I did not use trace-mode.
  1. I get the same error when I try to build without specifying any variants, or when using the -s flag.

Thank you.

comment:7 Changed 25 hours ago by reneeotten (Renee Otten)

that's strange as the builds on the buildbot and locally for me all succeed.

Please make sure that you do not have any Python packages installed through pip or any other means that could get picked up. Other than that I am not sure what to say; if there are other reports about the same issue we can certainly investigate further but for now I would conjecture that it is something with the specifics of your system.

comment:8 Changed 25 hours ago by reneeotten (Renee Otten)

You could also check the second link that Ryan posted and verify that you have no empty *.dist-info directories in the site-packages directory. Another way to likely rule out an issue like that is to install the py313 subport and see if that succeeds.

comment:9 in reply to:  7 Changed 23 hours ago by brolcz

Replying to reneeotten:

that's strange as the builds on the buildbot and locally for me all succeed.

Please make sure that you do not have any Python packages installed through pip or any other means that could get picked up. Other than that I am not sure what to say; if there are other reports about the same issue we can certainly investigate further but for now I would conjecture that it is something with the specifics of your system.

Thank you. I checked pip and I did have pyerfa in there. Upon uninstalling it from pip, the port did install successfully in macports. Thanks for the advice, and sorry for the goose chase!

comment:10 Changed 23 hours ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: assignedclosed

Glad you solved it!

Note: See TracTickets for help on using tickets.