onosproject / sdran-in-a-box

SDRAN-in-a-Box for SD-RAN project
28 stars 37 forks source link

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #179

Closed nimaafraz closed 2 years ago

nimaafraz commented 2 years ago

I get this error when trying to make.

I have tried downgrading and upgrading the markupsafe==2.0.1 <==> 2.1.0 with no luck.

Env: Ubuntu VM on VmWare

nima@sdran1:~/sdran-in-a-box$ make riab OPT=rimedots VER=v1.4.0
Helm arguments for rimedots: --set import.ran-simulator.enabled=true --set import.rimedo-ts.enabled=true --set ran-simulator.pci.modelName=two-cell-two-node-model
Helm values.yaml file: /home/nima/sdran-in-a-box//sdran-in-a-box-values-v1.4.0.yaml
HEAD is now at 9f79ab8 Fix the default SRIOV resource name for UPF user plane interfaces
HEAD is now at d22908d Updates fb-kpimon-xapp chart to not depend on servicemonitor crd (#1083)
source "/home/nima/sdran-in-a-box//workspace/build/venv/riab/bin/activate" && cd /home/nima/sdran-in-a-box//workspace/build/kubespray; \
ansible-playbook -b -i inventory/local/hosts.ini \
    -e "{'override_system_hostname' : False, 'disable_swap' : True}" \
    -e "{'docker_version' : 19.03}" \
    -e "{'docker_iptables_enabled' : True}" \
    -e "{'kube_version' : v1.18.9}" \
    -e "{'kube_network_plugin_multus' : True, 'multus_version' : stable, 'multus_cni_version' : 0.3.1}" \
    -e "{'kube_proxy_metrics_bind_address' : '0.0.0.0:10249'}" \
    -e "{'kube_pods_subnet' : 192.168.0.0/17, 'kube_service_addresses' : 192.168.128.0/17}" \
    -e "{'kube_apiserver_node_port_range' : 2000-36767}" \
    -e "{'kubeadm_enabled': True}" \
    -e "{'kube_feature_gates' : [SCTPSupport=True]}" \
    -e "{'kubelet_custom_flags' : [--allowed-unsafe-sysctls=net.*]}" \
    -e "{'dns_min_replicas' : 1}" \
    -e "{'helm_enabled' : True, 'helm_version' : v3.7.0}" \
    cluster.yml
Traceback (most recent call last):
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/bin/ansible-playbook", line 62, in <module>
    import ansible.constants as C
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/ansible/constants.py", line 12, in <module>
    from jinja2 import Template
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/nima/sdran-in-a-box/workspace/build/venv/riab/lib/python3.8/site-packages/markupsafe/__init__.py)
make: *** [mk/infra.mk:29: /home/nima/sdran-in-a-box//workspace/milestones/k8s-ready] Error 1
nimaafraz commented 2 years ago

Resolved by moving to Ubuntu 18.04

PauBaguer commented 2 years ago

I solved the issue by adding MarkupSafe<2.1.0 in this file: workspace/build/kubespray/requirements.txt