OMP: Error #179: Function Can't open SHM2 failed: OMP: System error #13: Permission denied

Viewed 267

In webots controller when I append path to sys.path for using kafka-config, I got this error. What should I do?

# base_controller.py
import sys
sys.path.append('../')
sys.path.append('../../../kafka-config/')

import numpy as np
import json
from kafka import KafkaConsumer, KafkaProducer
from utils import constant
# from utils import serializeImg
from consumer_config import webots_config as consumer_config
from producer_config import webots_config as producer_config

And this is the output terminal after I run the project.

INFO: base_controller: Starting controller: /home/matin/Programs/miniconda3/envs/all-in-one/bin/python3.9 -u base_controller.py
WARNING: base_controller: The process crashed some time after starting successfully.
OMP: Error #179: Function Can't open SHM2 failed:
OMP: System error #13: Permission denied
WARNING: 'base_controller' controller crashed.
1 Answers

It was because of my project structure. I had utils as both file(kafka-config.utils) and folder(webots.controllers.utils).

src/
├─ agents/
│  ├─ random/
│  │  ├─ random_agent.py
│  ├─ ...
│
├─ kafka-config/
│  ├─ utils.py
│  ├─ ...
│
├─ webots/
│  ├─ controllers/
│  │  ├─ base_controller/
│  │  │  ├─ base_controller.py
│  │  ├─ utils/
│  │  │  ├─ constant.py
│  ├─ ...
Related