question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task with path arguments including backslash fails in Windows

See original GitHub issue

Problem

If I run a taskipy task with path argument(s) including backslash, specified file path is not found and the task fails. This problem happens both in command prompt (cmd.exe) and in PowerShell (powershell.exe).

Step to reproduce

Create a new project with poetry and install latest taskipy.

> poetry new demo
> cd demo
> poetry install
> poetry add --dev taskipy

And edit pyproject.toml as below.

[tool.poetry]
name = "demo"
version = "0.1.0"
description = ""
authors = ["demo <foobar@example.com>"]

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
pytest = "^5.2"
taskipy = "^1.5.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.taskipy.tasks]
test = 'python -m pytest'

Then run test task with a path argument, it fails.

> poetry run task test .\tests\test_demo.py
============================================ test session starts ============================================
platform win32 -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: C:\Users\demo\tmp\demo
collected 0 items

=========================================== no tests ran in 0.00s ===========================================
ERROR: file not found: '.\tests\test_demo.py'

Environment

  • OS: Windows 10 20H2
  • Windows Build Number: 19042.630
  • Python: 3.8.5
  • Poetry: 1.1.4
  • taskipy: 1.5.0

PowerShell Version

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.610
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.610
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
illBeRoycommented, Nov 26, 2020

Hi! Thanks for reaching out and for the detailed explanation. I’ll take a look into the issue, and hopefully get it fixed as soon as possible 😃

0reactions
illBeRoycommented, Nov 28, 2020

Glad to hear! Have fun using taskipy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSBuild ClangCompile Task fails to pass include path with ...
The build fails, if adding an “Additional Include Directory” [2] with a space and a trailing backslash in the path. This is the...
Read more >
Backslash Problem when Running Script for Windows ...
I've tried rewriting the line with the path in the script numerous ways, but never can seen to get a single backslash to...
Read more >
ExternalProject fails when using paths with backslashes on ...
ExternalProject fails when using paths with backslashes on Windows ... It looks like \\t from "<SOURCE_DIR>\\test.txt" has turned into \t , which ...
Read more >
Backslash causes build failure using VSCode on Windows ...
When using the Docker plugin's "Build Image..." feature in the context menu the build fails because it runs WSL from a Windows CMD...
Read more >
Command tasks are failing when Integration Service Process ...
There seems to be an error related to the "\" slash versus "/". However, it works as normal when absolute path is provided...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found