# Error: Function not implemented when running dbt in Docker with python flask

**URL:** <https://discourse.getdbt.com/t/error-function-not-implemented-when-running-dbt-in-docker-with-python-flask/1125>\
**Category:** Help\
**Tags:** docker\
**Created:** [May 6, 2020, 6:07pm UTC](https://discourse.getdbt.com/t/error-function-not-implemented-when-running-dbt-in-docker-with-python-flask/1125 "2020-05-06T18:07:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GowthamVijayakumar](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@GowthamVijayakumar](https://discourse.getdbt.com/u/GowthamVijayakumar)\
**Post date:** [May 6, 2020, 6:07pm UTC](https://discourse.getdbt.com/t/error-function-not-implemented-when-running-dbt-in-docker-with-python-flask/1125/1 "2020-05-06T18:07:02Z")

</div>

Hi Everyone,

Am trying to run my dbt code in a Docker container environment by creating a “python flask” application to pass the dbt execution commands as POST API parameters. When I try to do that. Image is getting built fine. And for a sample test when I pass dbt --version it is completing successfully. But if i execute any other dbt command like debug , test , run. Am getting Function not implemented error.

Below is the output sample:

{  
“Command\_Result”: “Success”,  
Running with dbt=0.16.1  
dbt version: 0.16.1  
python version: 3.8.2  
python path: /usr/local/bin/python  
os info: Linux-4.4.0-x86\_64-with-glibc2.2.5  
Using profiles.yml file at /dbt/profiles.yml  
Using dbt\_project.yml file at /dbt/dbt\_project.yml

Configuration:  
profiles.yml file [OK found and valid]  
dbt\_project.yml file [OK found and valid]

Required dependencies: - git [OK found]  
Connection:  
method: service-account  
database: \<database\_name\>  
schema: \<schema\_name\>  
location: US  
priority: interactive  
timeout\_seconds: 300  
Encountered an error:  
[Errno 38] Function not implemented

}

Please help!!

Thanks in advance!

Thanks,  
Gowtham

---

<div class="post-metadata">

**Author:** ![jake](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/jake/32/37_2.png) [@jake](https://discourse.getdbt.com/u/jake)\
**Post date:** [May 6, 2020, 6:45pm UTC](https://discourse.getdbt.com/t/error-function-not-implemented-when-running-dbt-in-docker-with-python-flask/1125/2 "2020-05-06T18:45:02Z")

</div>

There’s a few things that can cause this, but that message came from docker - something dbt is doing is not available on your docker service. You can examine the log file dbt writes to `logs/dbt.log` and look for a stack trace to see what exactly it’s upset about, but that looks like it’s happening when dbt tries to connect to your data warehouse. Given the location of that error, maybe something about threading.Lock objects isn’t supported?

Unfortunately, various hosted docker solutions (and various docker-providing Linux distros!) have their own silly and obscure bugs around returning ENOSYS (the underlying message here) in various places, so it’s hard to say exactly what is going on or how you could fix it. A sampling from a quick search:

- If you’re on Windows, it’s possibly this bug: [https://github.com/docker/for-win/issues/5955](https://github.com/docker/for-win/issues/5955)
- If you’re on GCE, it could be this: [https://stackoverflow.com/q/59938948/11262881](https://stackoverflow.com/q/59938948/11262881)
- If you’re on Azure, this could be it: [https://stackoverflow.com/q/51616058/11262881](https://stackoverflow.com/q/51616058/11262881)

And I know Ubuntu in the 14.04 era used to return ENOSYS all the time for filesystem reasons. I’m sure that’s improved, but older Linux distributions/docker versions are more likely to ENOSYS.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [September 27, 2022, 4:45am UTC](https://discourse.getdbt.com/t/error-function-not-implemented-when-running-dbt-in-docker-with-python-flask/1125/3 "2022-09-27T04:45:22Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
