Buggy output in PowerShell whilst using Python Virtual environment

Đang mở
#4,824 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, powershell, python
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Start by reproducing the reported PgUp/PgDn behavior on Windows 10 with PowerShell 7.5.1, PSReadLine 2.3.6, and an active Python virtual environment. Trace the reported ScrollDisplayUp and InputLoop entry points; done means PgUp and PgDn scroll normally without the System.IO.IOException or buggy output.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Needs-Attention :wave:
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.
Exception report
### Exception

System.IO.IOException: The parameter is incorrect.
   at System.ConsolePal.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ScrollDisplayUp(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Screenshot

Lemme share my background and bit of context relevant to this:
I did not major in computer science, IT or even electronics for that matter. So I lack the technical expertise necessary to discuss this stuff in detail. Please bear with me if you find it too verbose and not to the point.

Context:
I have been learning python programming language for sometime and is relatively new to PowerShell. I am learning it with the help of "Learn Python the hard way!" written by Zed A. Shaw. I am mentioning it because my knowledge on PowerShell doesn't go much beyond the crash course at the end of the book. The book was designed in such a way that the learners must type in their code in something like Notepad++ and run it using PowerShell. I have recently upgraded to version 7 of PowerShell and is indeed convenient. After upgrading, I happen to begin my exercises on basic Skeleton directory and learnt to create virtual environments. Recently, I have been testing codes with nose2. So far, so good. However, when I pressed PgUp, PgDn to scroll (while a virtual environment was active), I got a buggy output. I am specifically mentioning the virtual environment thing because I just deactivated the virtual environment and seems too work fine when I press PgUp or PgDn to scroll.

I have been asked by Shell to report it and I did. I hope that it gets fixed. I wouldn't call it a serious bug as my computer didn't crash(Thankfully) and can continue using PowerShell but it's kinda annoying. Hope that it gets fixed.

Environment data
### Environment
PSReadLine: 2.3.6+d2e770f93b7a53d8660a6402eb29d1ae1c35e767
PowerShell: 7.5.1
OS: Microsoft Windows 10.0.19045
BufferWidth: 168
BufferHeight: 9001
Steps to reproduce

Activate a python virtual environment and press PgUp or PgDn. If you didn't get buggy output, try running nose2 tests on simple programs and then try again.
Edit: I unfortunately couldn't reproduce it but will let you know if I find it again.

Expected behavior

Pressing PgUp or PgDn should only scroll up or down(respectively). It works fine with Global environment but not in Virtual Environment.

Actual behavior

The buggy output as you can see in my upload. I copy pasted it in notepad, saved it and uploaded it for for reference.

PowerShell bug.txt

Ngôn ngữ chính
C#
Star
4.4k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSReadLine

Tất cả issue của PowerShell/PSReadLine

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.