Hi William, I notice the pyspatialite link Noli provided points the source back 
to your website for Mac OSX users.  If I did a complete uninstall/reinstall of 
QGIS and the GDAL framework shouldn't that fix the problem with pyspatialite?  
Thanks, Ty


On Oct 25, 2012, at 4:26 PM, William Kyngesburye wrote:

Looks like a different error now, and one that might really be related to 
something wrong with pyspatialite.

If you installed QGIS/GDAL a while ago, you should update.  I did have a 
problem in the SQLite framework at one point where it wouldn't load the 
spatialite stuff.  Fixed in the latest frameworks.

On Oct 25, 2012, at 9:09 AM, Frazier, Tyler James wrote:

When I try to load QGIS layers to SQLite using the plugin I get the following 
error ... I assumed SQLite was installed as part of the GDAL bundle, but I did 
that some time ago.

An error has occured while executing Python code:

Traceback (most recent call last):
 File 
"/Users/tyfrazier/.qgis//python/plugins/QspatiaLite/importQgis/importQgis.py", 
line 64, in run
   if not self.parent.db.uploadQgisVectorLayer(layer, 
tableName=self.tablenames[i], srid=self.srid, selected=self.selected):
 File "/Users/tyfrazier/.qgis//python/plugins/QspatiaLite/Classes/Database.py", 
line 249, in uploadQgisVectorLayer
   header,data=self.executeQuery("""INSERT INTO "%s" VALUES 
(%s,%s)"""%(tableName,','.join([unicode(value).encode('utf-8') for value in 
values_auto]),','.join('?'*len(values_perso))),tuple([unicode(value) for value 
in values_perso]),commit=True)
 File "/Users/tyfrazier/.qgis//python/plugins/QspatiaLite/Classes/Database.py", 
line 45, in executeQuery
   cursor.execute(query,params)
IntegrityError: ea_r1.Geometry violates Geometry constraint [geom-type or SRID 
not allowed]

Python version:
2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]


QGIS version:
1.8.0-Lisboa Lisboa,

Python path: ['/Applications/QGIS.app/Contents/MacOS/../Resources/python', 
'/Users/tyfrazier/.qgis//python', '/Users/tyfrazier/.qgis//python/plugins', 
'/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', 
'/Library/Frameworks/SQLite3.framework/Versions/3/Python/2.7', 
'/Library/Python/2.7/site-packages/numpy-override', 
'/Library/Frameworks/GDAL.framework/Versions/1.9/Python/2.7/site-packages', 
'/Library/Frameworks/cairo.framework/Versions/1/Python/2.7', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', 
'/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools', 
'/Users/tyfrazier/Documents/workspace/frazier/simpop_accra/mapping/qgis_project']


On Oct 25, 2012, at 3:31 PM, William Kyngesburye wrote:

It looks like Tyler is on OS X.  My SQLite framework includes pyspatialite.  If 
it was missing, wouldn't there be an python import error instead?

On Oct 25, 2012, at 6:50 AM, Noli Sicad wrote:

Hi Tyler,

You need to install pyspatialite.

Find out first the version of your spatialtite and follow the
instruction on how to install pyspatilate here.

http://www.gaia-gis.it/spatialite-3.0.0-BETA/spatialite-cookbook/html/python.html

Noli

On 10/25/12, Frazier, Tyler James 
<[email protected]<mailto:[email protected]>> wrote:
Hi, I was trying to load a QGIS layer into SQLite using the SQLite plugin
and get the following error -- not sure what to do?  Any suggestions?
thanks! Ty

An error has occured while executing Python code:

Traceback (most recent call last):
File
"/Users/tyfrazier/.qgis//python/plugins/QspatiaLite/QspatiaLiteApp.py", line
358, in importTxt
 self.app=ImportTxt(self)
File
"/Users/tyfrazier/.qgis//python/plugins/QspatiaLite/importTxt/importTxt.py",
line 30, in __init__
 self.ui.charsetList_CSV.insertItems(0, self.charset)
TypeError: QComboBox.insertItems(int, QStringList): argument 2 has
unexpected type 'list'

Python version:
2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]


QGIS version:
1.8.0-Lisboa Lisboa,

Python path: ['/Applications/QGIS.app/Contents/MacOS/../Resources/python',
'/Users/tyfrazier/.qgis//python', '/Users/tyfrazier/.qgis//python/plugins',
'/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins',
'/Library/Frameworks/SQLite3.framework/Versions/3/Python/2.7',
'/Library/Python/2.7/site-packages/numpy-override',
'/Library/Frameworks/GDAL.framework/Versions/1.9/Python/2.7/site-packages',
'/Library/Frameworks/cairo.framework/Versions/1/Python/2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages',
'/Library/Python/2.7/site-packages/PIL',
'/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools',
'/Users/tyfrazier/Documents/workspace/frazier/simpop_accra/mapping/qgis_project']
-----
Tyler Frazier
Department of Transportation Planning and Telematics
Technical University Berlin
http://www.vsp.tu-berlin.de/





_______________________________________________
Qgis-user mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence....

- the wisdom of Tarzan



-----
Tyler Frazier
Department of Transportation Planning and Telematics
Technical University Berlin
http://www.vsp.tu-berlin.de/




_______________________________________________
Qgis-user mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe



-----
Tyler Frazier
Department of Transportation Planning and Telematics
Technical University Berlin
http://www.vsp.tu-berlin.de/




_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to