'‘_curses.error: curses function returned NULL’ with windows-curses

Was trying to copy a project which includes working with Python's Curses Module. Since it is originally for MacOS and Linux, so downloaded it on Windows via the following command

pip install windows-curses

Initial Code goes as follows...

import curses
curses.initscr()
win = curses.newwin(50, 50, 0, 0)

Facing following problem after running in VSCode Terminal...

   win = curses.newwin(50, 50, 0, 0)
_curses.error: curses function returned NULL

Tried running through the docs, couldn't fix the problem.

Anyone please tell why is it going wrong and how to fix it.



Solution 1:[1]

When the terminal is too small try to test it in full screen mode (terminal)

Solution 2:[2]

You could use this plugin internet_speed to get speed of internet and use these values to show in your UI.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 amirhossein izadi
Solution 2 Felipe Vergara