Opened 5 years ago

Last modified 11 months ago

#2607 new defect

Python shell hint results in OSError error(None): None

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.4.5
Component: wxGUI Version: 7.0.0
Keywords: Cc:
CPU: Unspecified Platform: All

Description

In Python shell type in:

from grass.pygrass.modules.shortcuts import raster as r
r.

and observe how it gets filled with gazzilion of error messages: "OSError error(None): None"

Due to this error, it is impossible to use Python shell, as it is trying to execute error message as a command instead of just providing it as an "error text that messes up CLI".

Change History (13)

comment:1 Changed 5 years ago by marisn

Platform: MSWindows VistaAll

Same happens with 7.1 SVN on GNU/Linux, still error message is a bit different: "OSError error(2): No such file or directory"

comment:2 in reply to:  1 ; Changed 5 years ago by annakrat

Replying to marisn:

Same happens with 7.1 SVN on GNU/Linux, still error message is a bit different: "OSError error(2): No such file or directory"

It works fine for me using Ubuntu. Does it happen only in the Python shell in wxGUI?

comment:3 in reply to:  2 Changed 5 years ago by zarch

Replying to annakrat:

Replying to marisn:

Same happens with 7.1 SVN on GNU/Linux, still error message is a bit different: "OSError error(2): No such file or directory"

It works fine for me using Ubuntu. Does it happen only in the Python shell in wxGUI?

I have the same error also in ipython shell:

In [2]: r.OSError error(2): No such file or directory
OSError error(2): No such file or directory

Display all 187 possibilities? (y or n)
r.basin_fill
r.buffer
...

comment:4 Changed 4 years ago by martinl

Milestone: 6.4.6

comment:5 Changed 3 years ago by marisn

Milestone: 6.4.67.4.0

This is how a simple work session in current trunk on Gentoo Linux looks like:

Welcome to wxGUI Interactive Python Shell 0.9.8

Type "help(grass)" for more GRASS scripting related information.
Type "AddLayer()" to add raster or vector to the layer tree.

Python 2.7.12 (default, Oct  4 2016, 11:36:55) 
[GCC 5.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from grass.pygrass.modules.shortcuts import raster as r

>>> r.OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or direc
  File "<input>", line 1
    r.OSError(error(2): No such file or directory)
                      ^
SyntaxError: invalid syntax
>>> r.OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
OSError error(2): No such file or directory
info('shmin')
  File "<input>", line 1
    r.OSError(error(2): No such file or directory)
                      ^
SyntaxError: invalid syntax
>>> 

comment:6 Changed 22 months ago by neteler

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:7 Changed 18 months ago by neteler

Milestone: 7.4.17.4.2

comment:8 Changed 14 months ago by martinl

Unable to reproduce. What is the state of this issue?

comment:9 in reply to:  8 Changed 14 months ago by marisn

Replying to martinl:

Unable to reproduce. What is the state of this issue?

I am able to reproduce this issue with a self compiled current trunk on Ubuntu and Gentoo machines thus this bug report is still valid.

comment:10 Changed 13 months ago by neteler

marisn: please test it in trunk with Python3.

comment:11 Changed 13 months ago by neteler

Milestone: 7.4.27.4.3

Ticket retargeted after milestone closed

comment:12 Changed 11 months ago by martinl

Milestone: 7.4.37.4.4

Bump milestone to 7.4.4

comment:13 Changed 11 months ago by neteler

Milestone: 7.4.47.4.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.