open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
223 stars 57 forks source link

Getting AssertionError when executing python3 -m pip install flask-socketio fastapi uvicorn datamodel_code_generator #372

Closed Steven-NYP closed 11 months ago

Steven-NYP commented 12 months ago

Before proceeding, is there an existing issue or discussion for this?

OS and version

22.04

Open-RMF installation type

Binaries

Other Open-RMF installation methods

https://github.com/open-rmf/rmf#binary-installation

Open-RMF version or commit hash

2.3.0

ROS distribution

Humble

ROS installation type

Binaries

Other ROS installation methods

No response

Package or library, if applicable

No response

Description of the bug

When executing python3 -m pip install flask-socketio fastapi uvicorn datamodel_code_generator in rmf setup section (https://github.com/open-rmf/rmf), the following error is received

image

Did I missed out anything?

Steps to reproduce the bug

  1. Follow the instruction in rmf setup section (https://github.com/open-rmf/rmf)
  2. execute python3 -m pip install flask-socketio fastapi uvicorn datamodel_code_generator
  3. datamodel_code_generator will produce the error.

Expected behavior

No response

Actual behavior

No response

Additional information or screenshots

No response

aaronchongth commented 12 months ago

Please refrain from posting screenshots of logs or errors, this makes it difficult to search or selectively copy any meaningful text for debugging, use https://gist.github.com/ instead in the future. As of now, we are unable to see error's entire output.

I believe the issue is that the package is called datamodel-code-generator, could you try python3 -m pip install flask-socketio fastapi uvicorn datamodel-code-generator instead?

Steven-NYP commented 11 months ago

Hi @aaronchongth, noted on the screenshot comment.

I have tried the command you suggested, the errors are still the same. The output is as follows https://gist.github.com/Steven-NYP/b0d86383a9a2322d8cc44ce74ecc60c2

aaronchongth commented 11 months ago

I can reproduce it on a clean docker image too, I believe this might be an issue with datamodel-code-generator at the tip, which is incompatible with the other pip packages installed.

https://github.com/open-rmf/rmf/pull/375 is a fix. Just use a fixed version and install in a separate step,

python3 -m pip install flask-socketio fastapi uvicorn
python3 -m pip install datamodel_code_generator==0.11.19
aaronchongth commented 11 months ago

Hello @Steven-NYP! After some internal discussions we have decided that the proper fix is to remove datamodel_code_generator from the main installation instructions, as it is only used in dev. https://github.com/open-rmf/rmf/pull/375 removes it. You can proceed with the installation without it, python3 -m pip install flask-socketio fastapi uvicorn

Steven-NYP commented 11 months ago

@aaronchongth, thanks for the update. Installation is working now.