muccg / rdrf

The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.
GNU Affero General Public License v3.0
15 stars 8 forks source link

AttributeError: module 'numpy' has no attribute 'float' has just broken build #2293

Closed id2359 closed 1 year ago

id2359 commented 1 year ago

Just started to happen in the build when the migration check run:

+ exec django-admin makemigrations --dry-run --noinput --check
Traceback (most recent call last):
  File "/env/bin/django-admin", line 8, in <module>
    sys.exit(execute_from_command_line())
  File "/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/env/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/env/lib/python3.8/site-packages/django/core/management/base.py", line 393, in execute
    self.check()
  File "/env/lib/python3.8/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/env/lib/python3.8/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/env/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/env/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/env/lib/python3.8/site-packages/django/urls/resolvers.py", line 416, in check
    for pattern in self.url_patterns:
  File "/env/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/env/lib/python3.8/site-packages/django/urls/resolvers.py", line 602, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/env/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/env/lib/python3.8/site-packages/django/urls/resolvers.py", line 595, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/rdrf/rdrf/urls.py", line 29, in <module>
    import rdrf.routing.login_router as login_router
  File "/app/rdrf/rdrf/routing/login_router.py", line 12, in <module>
    from rdrf.workflows.verification import verifications_apply
  File "/app/rdrf/rdrf/workflows/verification.py", line 1, in <module>
    from explorer.views import Humaniser
  File "/app/rdrf/explorer/views.py", line 24, in <module>
    from rdrf.services.io.reporting.spreadsheet_report import SpreadSheetReport
  File "/app/rdrf/rdrf/services/io/reporting/spreadsheet_report.py", line 1, in <module>
    import openpyxl as xl
  File "/env/lib/python3.8/site-packages/openpyxl/__init__.py", line 4, in <module>
    from openpyxl.compat.numbers import NUMPY, PANDAS
  File "/env/lib/python3.8/site-packages/openpyxl/compat/__init__.py", line 3, in <module>
    from .numbers import NUMERIC_TYPES
  File "/env/lib/python3.8/site-packages/openpyxl/compat/numbers.py", line 41, in <module>
    numpy.float,
  File "/env/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'
id2359 commented 1 year ago

https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971

id2359 commented 1 year ago

Trying upgrade of openpyxl to 3.0.10