Opened 9 years ago

Last modified 5 years 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 by marisn, 9 years ago

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"

in reply to:  1 ; comment:2 by annakrat, 9 years ago

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?

in reply to:  2 comment:3 by zarch, 9 years ago

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 by martinl, 9 years ago

Milestone: 6.4.6

comment:5 by marisn, 7 years ago

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 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:7 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:8 by martinl, 6 years ago

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

in reply to:  8 comment:9 by marisn, 6 years ago

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 by neteler, 6 years ago

marisn: please test it in trunk with Python3.

comment:11 by neteler, 5 years ago

Milestone: 7.4.27.4.3

Ticket retargeted after milestone closed

comment:12 by martinl, 5 years ago

Milestone: 7.4.37.4.4

Bump milestone to 7.4.4

comment:13 by neteler, 5 years ago

Milestone: 7.4.47.4.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.