Opened 6 years ago

Last modified 6 years ago

#3569 new defect

pyGRASS: vector attributes return None

Reported by: lucadelu Owned by: grass-dev@…
Priority: normal Milestone: 7.4.5
Component: PyGRASS Version: unspecified
Keywords: VectorTopo, attributes table Cc:
CPU: All Platform: All

Description (last modified by neteler)

If you try to open a vector map in a Mapset different from the current it seems not possible to read attributes. Running the following code from user1 mapset of nc_spm_08

from grass.pygrass.vector import VectorTopo

#counties = VectorTopo('boundary_county')
counties = VectorTopo('boundary_county', mapset='PERMANENT')
counties.open('r')
first = counties[1]
first
first.attrs.values()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'values'

Change History (5)

comment:1 by neteler, 6 years ago

Description: modified (diff)

comment:2 by neteler, 6 years ago

Confirmed in trunk (I used r73241)

comment:3 by neteler, 6 years ago

Milestone: 7.4.27.4.3

Ticket retargeted after milestone closed

comment:4 by martinl, 6 years ago

Milestone: 7.4.37.4.4

Bump milestone to 7.4.4

comment:5 by neteler, 6 years ago

Milestone: 7.4.47.4.5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.