Skip to content

concore FRI methods (build, debug, run, clear, stop, and destroy) do not work in Windows #31

Closed

Description

@parteekcoder

I am trying to make request on all routes to understand the concore better "upload" route is working fine
But when I ran "build" it didn't work

It showed me "FileNotFoundError" see last line

image

@pradeeban

Activity

  1. parteekcoder commented on Feb 18, 2023

    @parteekcoder
    ContributorAuthor

    Hey @pradeeban This is a bug.

    I am running this on windows

    I am making changes to this PR when it is completed I will tell you

  2. changed the title [-]build route not working (doubt)[/-] [+]build route not working (bug)[/+] on Feb 18, 2023
  3. pradeeban commented on Feb 18, 2023

    @pradeeban
    Member

    Can you please re-run on the main branch and copy-paste the whole error (instead of a screenshot)?

    @amit-62 implemented this and tested it on Linux and Mac. It was not tested on Windows, and likely, something is missing. Any possible fixes should be tested on both Linux and Windows to avoid breaking the Linux version.

  4. changed the title [-]build route not working (bug)[/-] [+]concore FRI methods (build, debug, run, clear, stop, and destroy) do not work in Windows[/+] on Feb 18, 2023
  5. parteekcoder commented on Feb 18, 2023

    @parteekcoder
    ContributorAuthor

    Can you please re-run on the main branch and copy-paste the whole error (instead of a screenshot)?

    @amit-62 implemented this and tested it on Linux and Mac. It was not tested on Windows, and likely, something is missing. Any possible fixes should be tested on both Linux and Windows to avoid breaking the Linux version.

    I have tested my changes on windows and MACOS but I will update all paths shortly

  6. pradeeban commented on Feb 18, 2023

    @pradeeban
    Member

    Thanks a lot, @parteekcoder!

  7. parteekcoder commented on Feb 18, 2023

    @parteekcoder
    ContributorAuthor

    Can you please re-run on the main branch and copy-paste the whole error (instead of a screenshot)?

    @amit-62 implemented this and tested it on Linux and Mac. It was not tested on Windows, and likely, something is missing. Any possible fixes should be tested on both Linux and Windows to avoid breaking the Linux version.

    yes sure this is the error

    Traceback (most recent call last):
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] The system cannot find the file specified127.0.0.1 - - [19/Feb/2023 01:34:44] "POST /build/test?fetch=sampleplot&apikey=xyz HTTP/1.1" 500 -
    [2023-02-19 01:34:59,867] ERROR in app: Exception on /build/test [POST]
    Traceback (most recent call last):
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "F:\GSOC\emori-bmi-gsoc\concore\concore\fri\server\main.py", line 73, in build
    proc = call(["./makestudy", makestudy_dir], cwd=concore_path)
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in init
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\Nitika\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] The system cannot find the file specified

  8. pradeeban commented on Feb 22, 2023

    @pradeeban
    Member

    Fixed in #51.

  9. amit-62 commented on Feb 22, 2023

    @amit-62
    Contributor

    Hello everyone sorry for chiming in late but putting shell=true in subprocess exposes it to security leaks. @parteekcoder please look into this.

  10. pradeeban commented on Feb 22, 2023

    @pradeeban
    Member

    @Rahuljagwani implemented the PR. I think at this point, when we are not really using it in practice, it is better to have an implementation that works for Windows (as in the merged PR). In the next iteration, we can improve further (incorporating Kong and API keys).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions