Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More readable errors #5

Open
smarie opened this issue Jul 23, 2019 · 3 comments · May be fixed by #7
Open

More readable errors #5

smarie opened this issue Jul 23, 2019 · 3 comments · May be fixed by #7

Comments

@smarie
Copy link

smarie commented Jul 23, 2019

I tried a simple makefile with an echo command on windows

.PHONY: say_hello
.DEFAULT_GOAL := say_hello

say_hello:
	@echo "hello"

And got this error:

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.3\helpers\pydev\pydevd.py", line 1758, in <module>
    main()
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.3\helpers\pydev\pydevd.py", line 1752, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.3\helpers\pydev\pydevd.py", line 1147, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/_dev/python_ws/_Libs_OpenSource/py-make/examples/simple_examples.py", line 21, in <module>
    main()
  File "C:/_dev/python_ws/_Libs_OpenSource/py-make/examples/simple_examples.py", line 17, in main
    pymake.main()
  File "C:\_dev\python_ws\_Libs_OpenSource\py-make\pymake\_main.py", line 63, in main
    ignore_errors=opts['--ignore-errors'])
  File "C:\_dev\python_ws\_Libs_OpenSource\py-make\pymake\_pymake.py", line 143, in execute_makefile_commands
    check_call(parsed_cmd)
  File "C:\Miniconda3\envs\tools_py37\lib\subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Miniconda3\envs\tools_py37\lib\subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Miniconda3\envs\tools_py37\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:\Miniconda3\envs\tools_py37\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.3\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 513, in new_CreateProcess
    return getattr(_subprocess, original_name)(app_name, patch_arg_str_win(cmd_line), *args)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

It seems that the stacktrace could definitely be improved. I'll propose a PR for this.

@casperdcl
Copy link
Sponsor Member

haven't checked but it may be := isn't supported

@casperdcl
Copy link
Sponsor Member

or maybe Makefile isn't accessible in your cwd

@smarie
Copy link
Author

smarie commented Jul 23, 2019

It was actually @echo that is not accessible because on windows it is not an exe but a command from the CMD. But I will still propose something to improve the stack trace

smarie pushed a commit to smarie/py-make that referenced this issue Jul 23, 2019
@smarie smarie linked a pull request Jul 23, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants