[GRASS-dev] [GRASS GIS] #3569: pyGRASS: vector attributes return None

#3569: pyGRASS: vector attributes return None
------------------------------------------+-------------------------
Reporter: lucadelu | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.4.2
Component: PyGRASS | Version: unspecified
Keywords: VectorTopo, attributes table | CPU: All
Platform: All |
------------------------------------------+-------------------------
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

{{{

#counties = VectorTopo('boundary_county')
counties = VectorTopo('boundary_county', mapset='PERMANENT')
counties.open('r')
first = counties[1]
first
first.attrs.values()
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3569&gt;
GRASS GIS <https://grass.osgeo.org>

#3569: pyGRASS: vector attributes return None
-----------------------+------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: PyGRASS | Version: unspecified
Resolution: | Keywords: VectorTopo, attributes table
       CPU: All | Platform: All
-----------------------+------------------------------------------
Description changed by neteler:

Old description:

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

{{{

#counties = VectorTopo('boundary_county')
counties = VectorTopo('boundary_county', mapset='PERMANENT')
counties.open('r')
first = counties[1]
first
first.attrs.values()
}}}

New description:

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'
}}}

--

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3569#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3569: pyGRASS: vector attributes return None
-----------------------+------------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.2
Component: PyGRASS | Version: unspecified
Resolution: | Keywords: VectorTopo, attributes table
       CPU: All | Platform: All
-----------------------+------------------------------------------

Comment (by neteler):

Confirmed in trunk (I used r73241)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3569#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>