Python flask reloader “Errno 2 No such file or directory” error when running on dockerFind all files in a directory with extension .txt in PythonHow can I call 'git pull' from within Python?fatal error: Python.h: No such file or directoryscikit - random forest regressor - AttributeError: 'Thread' object has no attribute '_children'Error with LocalAudioFile(file) returns OSError: [Errno 2] No such file or directoryPython Selenium setting path to firefox profile (ubuntu)How to keep Werkzeug from crashing after NGINX closes pipe?subprocess open ('source venv/bin/activate'),no such file?Flask gives “error 32 broken pipe” when being requested too oftenIOError: [Errno2] No such file or directory: for input files to flask

What is -(-2,3,4)?

Does the North Korea Kim Jong Un have an heir?

Why are symbols not written in words?

Does this house rule, for determining hit point maximum, make characters weaker than RAW?

Magento 2: I am not aware about magneto optimization. Can you please share the steps for this?

"Best practices" for formulating MIPs

Go function to test whether a file exists

Which high-degree derivatives play an essential role?

Bypass with wrong cvv of debit card and getting OTP

Bootstrap paradox with a time machine in iron

Was Wolfgang Unzicker the last Amateur GM?

My players like to search everything. What do they find?

What instances can be solved today by modern solvers (pure LP)?

Is it possible to spoof an IP address to an exact number?

Should I cheat if the majority does it?

Does a reference have a storage location?

Phrase origin: "You ain't got to go home but you got to get out of here."

Contributing to a candidate as a Foreign National US Resident?

HTTPmodule or similar for SharePoint online

Can the word "coexist" be used for more than two things/people/subjects/... etc?

Which are more efficient in putting out wildfires: planes or helicopters?

what is the meaning of "stock" dilution on the Massive Dev Chart Website?

Does this circuit have marginal voltage level problem?

How frequently do Russian people still refer to others by their patronymic (отчество)?



Python flask reloader “Errno 2 No such file or directory” error when running on docker


Find all files in a directory with extension .txt in PythonHow can I call 'git pull' from within Python?fatal error: Python.h: No such file or directoryscikit - random forest regressor - AttributeError: 'Thread' object has no attribute '_children'Error with LocalAudioFile(file) returns OSError: [Errno 2] No such file or directoryPython Selenium setting path to firefox profile (ubuntu)How to keep Werkzeug from crashing after NGINX closes pipe?subprocess open ('source venv/bin/activate'),no such file?Flask gives “error 32 broken pipe” when being requested too oftenIOError: [Errno2] No such file or directory: for input files to flask






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I have a problem running a little Flask app with Docker. Everything works fine with debug off, but when I try to run it with debug on it fails at the reloader stage. It works fine on Windows, the problem only comes up with Docker.



In my docker repo I install caffe and all the dependencies I need (flask and wekrzeug). I thought the problem could be with the reloader so I also installed watchdog but it still shows up. Doesn't matter whether I run app.py itself or call python -m flask run.



docker run --volume=%cd%:/workspace -p 5001:5000 caffe:cpu
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with inotify reloader
Traceback (most recent call last):
File "app.py", line 53, in <module>
app.run(debug = True, host='0.0.0.0')
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 943, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 988, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
exit_code = subprocess.call(args, env=new_environ, close_fds=False)
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory









share|improve this question






























    3















    I have a problem running a little Flask app with Docker. Everything works fine with debug off, but when I try to run it with debug on it fails at the reloader stage. It works fine on Windows, the problem only comes up with Docker.



    In my docker repo I install caffe and all the dependencies I need (flask and wekrzeug). I thought the problem could be with the reloader so I also installed watchdog but it still shows up. Doesn't matter whether I run app.py itself or call python -m flask run.



    docker run --volume=%cd%:/workspace -p 5001:5000 caffe:cpu
    * Serving Flask app "app" (lazy loading)
    * Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
    * Debug mode: on
    * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
    * Restarting with inotify reloader
    Traceback (most recent call last):
    File "app.py", line 53, in <module>
    app.run(debug = True, host='0.0.0.0')
    File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 943, in run
    run_simple(host, port, self, **options)
    File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 988, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
    File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
    sys.exit(reloader.restart_with_reloader())
    File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
    exit_code = subprocess.call(args, env=new_environ, close_fds=False)
    File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
    File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory









    share|improve this question


























      3












      3








      3








      I have a problem running a little Flask app with Docker. Everything works fine with debug off, but when I try to run it with debug on it fails at the reloader stage. It works fine on Windows, the problem only comes up with Docker.



      In my docker repo I install caffe and all the dependencies I need (flask and wekrzeug). I thought the problem could be with the reloader so I also installed watchdog but it still shows up. Doesn't matter whether I run app.py itself or call python -m flask run.



      docker run --volume=%cd%:/workspace -p 5001:5000 caffe:cpu
      * Serving Flask app "app" (lazy loading)
      * Environment: production
      WARNING: Do not use the development server in a production environment.
      Use a production WSGI server instead.
      * Debug mode: on
      * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
      * Restarting with inotify reloader
      Traceback (most recent call last):
      File "app.py", line 53, in <module>
      app.run(debug = True, host='0.0.0.0')
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 943, in run
      run_simple(host, port, self, **options)
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 988, in run_simple
      run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
      sys.exit(reloader.restart_with_reloader())
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
      exit_code = subprocess.call(args, env=new_environ, close_fds=False)
      File "/usr/lib/python2.7/subprocess.py", line 523, in call
      return Popen(*popenargs, **kwargs).wait()
      File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
      raise child_exception
      OSError: [Errno 2] No such file or directory









      share|improve this question
















      I have a problem running a little Flask app with Docker. Everything works fine with debug off, but when I try to run it with debug on it fails at the reloader stage. It works fine on Windows, the problem only comes up with Docker.



      In my docker repo I install caffe and all the dependencies I need (flask and wekrzeug). I thought the problem could be with the reloader so I also installed watchdog but it still shows up. Doesn't matter whether I run app.py itself or call python -m flask run.



      docker run --volume=%cd%:/workspace -p 5001:5000 caffe:cpu
      * Serving Flask app "app" (lazy loading)
      * Environment: production
      WARNING: Do not use the development server in a production environment.
      Use a production WSGI server instead.
      * Debug mode: on
      * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
      * Restarting with inotify reloader
      Traceback (most recent call last):
      File "app.py", line 53, in <module>
      app.run(debug = True, host='0.0.0.0')
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 943, in run
      run_simple(host, port, self, **options)
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 988, in run_simple
      run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
      sys.exit(reloader.restart_with_reloader())
      File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
      exit_code = subprocess.call(args, env=new_environ, close_fds=False)
      File "/usr/lib/python2.7/subprocess.py", line 523, in call
      return Popen(*popenargs, **kwargs).wait()
      File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
      raise child_exception
      OSError: [Errno 2] No such file or directory






      python windows docker flask






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 at 18:30







      user1845455

















      asked Mar 25 at 17:46









      user1845455user1845455

      212 bronze badges




      212 bronze badges






















          2 Answers
          2






          active

          oldest

          votes


















          1














          I've encountered the same problem here and the solution for me was to remove the executable flag from the "run.py" file.




          $ chmod -x run.py




          The error was very similar, but in my case I'm using an Ubuntu 18.04 WSL on a Windows 10 machine.






          share|improve this answer






























            0














            Try to run the app as a module:



            python -m flask run


            See https://github.com/pallets/flask/issues/1829 for more information.






            share|improve this answer























            • Thanks but like I said in the post, I've already tried that.

              – user1845455
              May 10 at 18:19













            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55343729%2fpython-flask-reloader-errno-2-no-such-file-or-directory-error-when-running-on%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I've encountered the same problem here and the solution for me was to remove the executable flag from the "run.py" file.




            $ chmod -x run.py




            The error was very similar, but in my case I'm using an Ubuntu 18.04 WSL on a Windows 10 machine.






            share|improve this answer



























              1














              I've encountered the same problem here and the solution for me was to remove the executable flag from the "run.py" file.




              $ chmod -x run.py




              The error was very similar, but in my case I'm using an Ubuntu 18.04 WSL on a Windows 10 machine.






              share|improve this answer

























                1












                1








                1







                I've encountered the same problem here and the solution for me was to remove the executable flag from the "run.py" file.




                $ chmod -x run.py




                The error was very similar, but in my case I'm using an Ubuntu 18.04 WSL on a Windows 10 machine.






                share|improve this answer













                I've encountered the same problem here and the solution for me was to remove the executable flag from the "run.py" file.




                $ chmod -x run.py




                The error was very similar, but in my case I'm using an Ubuntu 18.04 WSL on a Windows 10 machine.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 5 at 19:29









                KaniabiKaniabi

                5124 silver badges8 bronze badges




                5124 silver badges8 bronze badges























                    0














                    Try to run the app as a module:



                    python -m flask run


                    See https://github.com/pallets/flask/issues/1829 for more information.






                    share|improve this answer























                    • Thanks but like I said in the post, I've already tried that.

                      – user1845455
                      May 10 at 18:19















                    0














                    Try to run the app as a module:



                    python -m flask run


                    See https://github.com/pallets/flask/issues/1829 for more information.






                    share|improve this answer























                    • Thanks but like I said in the post, I've already tried that.

                      – user1845455
                      May 10 at 18:19













                    0












                    0








                    0







                    Try to run the app as a module:



                    python -m flask run


                    See https://github.com/pallets/flask/issues/1829 for more information.






                    share|improve this answer













                    Try to run the app as a module:



                    python -m flask run


                    See https://github.com/pallets/flask/issues/1829 for more information.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 6 at 0:36









                    Gabriel H.Gabriel H.

                    2904 bronze badges




                    2904 bronze badges












                    • Thanks but like I said in the post, I've already tried that.

                      – user1845455
                      May 10 at 18:19

















                    • Thanks but like I said in the post, I've already tried that.

                      – user1845455
                      May 10 at 18:19
















                    Thanks but like I said in the post, I've already tried that.

                    – user1845455
                    May 10 at 18:19





                    Thanks but like I said in the post, I've already tried that.

                    – user1845455
                    May 10 at 18:19

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55343729%2fpython-flask-reloader-errno-2-no-such-file-or-directory-error-when-running-on%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript