Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't create database specially Sys.table #16

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 13 comments
Open

can't create database specially Sys.table #16

GoogleCodeExporter opened this issue Mar 13, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.open Qgis 
2.open qSpatialLite
3.open/create new database

What is the expected output? What do you see instead?
expected : full sys. Table
seen : "no such table: views_geometry_columns"
Tehn : "This DataBase seems to be a valid db DataBase but not a valid 
SpatiaLite One
Would you like QSpatiaLite to automatically transform it to SpatiaLite 
(information won't be lost) ?"

What version of the product are you using? On what operating system?
Qgis 1.8 ; QspatiaLite 6.0.6 ; WIN 7 Pro 64

Please provide any additional information below.
Impossible de creer la table initiale sys.
J'ai essayé d'ajouter une couche à une base existante qui avait le sys table 
remplie : echec, table vide après un message "no such function : CastToMulti".
J'ai transformé les couches multipoint en point : même résultat.
S'il s'agit de deux problemes differents (creation/import), alors desolé pour 
l'amalgame.

Original issue reported on code.google.com by [email protected] on 27 Feb 2013 at 9:14

@GoogleCodeExporter
Copy link
Author

Désolé, mais je ne suis pas sûr de comprendre le problème.

Lorsque QSpatiaLite pose la question "This DataBase seems to be a valid db 
DataBase but not a valid SpatiaLite One Would you like QSpatiaLite to 
automatically transform it to SpatiaLite (information won't be lost) ?", il 
faut répondre "YES". 

Si ça ne marche pas (chez moi ça marche, avec une config identique à la 
tienne), essaies d'executer la requete SQL suivante:
SELECT initspatialmetadata()

Original comment by [email protected] on 27 Feb 2013 at 10:36

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Merci d avoir répondu :)

J essaie de reformuler.
il m est impossible de creer une base sous QSL.
Le message derreur (ci dessus) apparait. ET quand je reponds "Yes" et bien 
"Unable to convert Database to SpatiaLite" et table sys. est vide.

SELECT initspatialmetadata() renvoie 0.
---
Si je prends une base existante et que j importe une couche, j'ai "The SQL 
query seems to be invalid.

no such function: CastToMulti".
Je ne sais pas si les 2 trucs sont liés.

Original comment by [email protected] on 27 Feb 2013 at 11:20

@GoogleCodeExporter
Copy link
Author

Oui, c'est lié.

Par contre, le fait que tu aies la première erreur me surprend.
La v6.0.6 est censée résoudre ce soucis...

Tentes une reinstallation du plugin

Original comment by [email protected] on 27 Feb 2013 at 11:35

@GoogleCodeExporter
Copy link
Author

dejà fait tu penses bien...

Original comment by [email protected] on 27 Feb 2013 at 11:50

@GoogleCodeExporter
Copy link
Author

Dans la console QGIS de python, tape:

from pyspatialite import dbapi2 as db
conn = db.connect('test_db.sqlite')
cur = conn.cursor()
rs = cur.execute('SELECT sqlite_version(), spatialite_version()')
for row in rs:
    msg = "> SQLite v%s Spatialite v%s" % (row[0], row[1])
    print msg



Quelles versions de SQLITE et SPATIALITE sont affichés ?

Original comment by [email protected] on 27 Feb 2013 at 2:53

@GoogleCodeExporter
Copy link
Author

SQLite v3.6.16 Spatialite v2.3.1

Original comment by [email protected] on 27 Feb 2013 at 2:55

@GoogleCodeExporter
Copy link
Author

Ah, spatialite V2.3 ... chez moi, j'ai la v3.
j'essairais de reproduire le probleme chez moi.

En attendant, tu peux essayer la version V6.0.5 de QSpatiaLite ( voire 6.0.4 ), 
voire si jamais ça change quelque chose. ( en telechargement sur ce site)

Original comment by [email protected] on 27 Feb 2013 at 3:45

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

ok asap
merci

Original comment by [email protected] on 28 Feb 2013 at 7:57

@GoogleCodeExporter
Copy link
Author

J'ai essayé avec la derniere version 6.0.6 puis j ai retrogradé jusqu'à la 
la version 5 ; avec qgis 1.8 comme 1.7.4.
Marche plus du tout. Tjs un souci d initialisation :/

Original comment by [email protected] on 28 Feb 2013 at 3:21

@GoogleCodeExporter
Copy link
Author

9a peux venir d'une "mauvaise" installation de pyspatialite ... sinon, je ne 
vois vraiment pas.

Dans la console python de qgis tape: ( en fait il s'agit exactement du code 
implémenté par qspatialite)

from pyspatialite import dbapi2 as db
conn=db.connect('testData.sqlite')
query = "select initspatialmetadata()"
c=conn.cursor()
c.execute(query)
print [row for row in c]

la réponse doît être "1". Si tu obtiens 1, c'est bien un soucis de 
cohabitation de plusieures versions de pyspatialite voire spatialite lors de 
l'installation de QGIS.
-> ce qui me semble probable, car QGIS 1.8 est livré par défaut avec 
spatialite v3

Sinon, je ne comprend pas, impossible de reproduire le pb chez moi.

Original comment by [email protected] on 5 Mar 2013 at 2:49

@GoogleCodeExporter
Copy link
Author

je teste asap: je suis en deplacement là.
Merci

Original comment by [email protected] on 5 Mar 2013 at 5:00

@GoogleCodeExporter
Copy link
Author

le retour : 

pour varier les plaisir j ai installé sur un xp familial QGis 1.8 et le 
derniere version de qspatialite.
résultat : toujours impossible d uploader un shp. Là rien de nouveau.

from pyspatialite import dbapi2 as db
conn=db.connect('testData.sqlite')
query = "select initspatialmetadata()"
c=conn.cursor()
c.execute(query)
print [row for row in c]

me renvoie [(1,)]
donc pb de cohabitation (?)
Que faire alors ?
merci 

Original comment by [email protected] on 7 Mar 2013 at 6:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant