Import Shapefile to Postgres - postgresql

I am trying to import a shapefile to Postgres using the following:
shp2pgsql c:\location\water_areas.shp water > water.sql
I am receiving the following message:
c:\location\water_areas.shp: shape (.shp) or index file (.shx) can not be opened, will just import attribute data.
Unfortunately I need more than just attribute data. I need the geometry column. Please help. Why won't it open the shapefile for the conversion.

Without any extra information, there's no way to answer your question. The error message is indicating the app is not finding one or more of the file components. Try running the app inside the 'location' directory with a relative path and see if that changes.

Related

Is there a way to filter for ways that are outers in Osmium?

I am trying to get an extract of an osm file that contains ways that are outers of relations. How would I go about doing this? I have tried using osmium tags-filter but cannot seem to find an option that works for finding outers, as those specifically have no tags.
This is the website from which I downloaded the input .osm.pbf file. The file is linked to in the “United States of America” row under the “.osm.pbf” column
Thank you for your help!

Object reference exception when importing content in Episerver

We are using Optimizely/Episerver CMS 11.20. When trying to export a page hierarchy from our production environment and then import the resulting ExportedFile.episerverdata file to our acceptance test environment I get the following error:
[Importing content 70725_133679] Exception: Object reference not set to an instance of an object.
I have no idea what 70725_133679 is referring to. Is there a way to look this up, e.g. via an SQL query against the "EPi" database?
It refers to a specific version of some content (which could be just about anything).
You could try to browse to https://yoursite/EPiServer/CMS/#context=epi.cms.contentdata:///70725_133679 (note the ID at the end) to see which content it is.
Got another answer on a Optimizely forum (thanks to Surjit Bharath):
The following SQL against the EPi database gives information about the referenced content:
select * from tblContent where pkID = 70725 
select * from tblWorkContent where pkID = 133679
This too points to a submit button. I have yet to understand why that block would cause an exception during import, but now I at least have a place to start digging.

distilbert model is not working at ktrain

I tried to use distilbert classifier. but I am getting the following error.
This is my code
(X_train,y_train),(X_test,y_test),prepro
=text.texts_from_df(train_df=data_train,text_column="Cleaned",label_columns=col
,val_df=data_test,maxlen=500,preprocess_mode="distilbert")
and here is the error
OSError: Model name 'distilbert-base-uncased' was not found in tokenizers model name list (distilbert-base-uncased, distilbert-base-uncased-distilled-squad, distilbert-base-cased, distilbert-base-cased-distilled-squad, distilbert-base-german-cased, distilbert-base-multilingual-cased). We assumed 'distilbert-base-uncased' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.txt'] but couldn't find such vocabulary files at this path or url._
Due to my office current environmental issue, I can only work on tf 2.2 and python 3.8. Right now I am using 0.19.
Do you think it will affect my current environment if I downgrade it to 0.16?
This error may happen if there is a network or firewall issue preventing download of the tokenizer files. See this FAQ entry for remedies.
Also, when you use preprocess_mode='distilbert', texts_from* functions return TransformerDataset instances, not arrays. You'll need to replace (X_train, y_train) with train_data, for example. See this example notebook.

DWG/DXF import in QGis fails

I have a dwg-file and want to import it into QGIS (3.12.3) using Project >> Import DWG/DXF. The import cannot be started with the failure:
Cannot open layer list
I converted the dwg in to a dxf using the ODA file converter 21.4.0, but the same error occurs.
After that I tried to import a dwg sample file with the same result, so I guess the file itself is not the problem.
I am new to QGIS - does anyone know why this error occurs?
There was a bug in QGis 3.4 that generated this message(1); it should be fixed by now, but it's maybe related to your problem. The problem was in the GeoPackage database: it was impossible to create a new GeoPackage from the interface, you had to select an existing one, but then it didn't have the expected structure.
Do you create a new GeoPackage database or do you provide an existing one?
Just a guess; importing from dwg can fail for several reasons.
(1) https://issues.qgis.org/issues/20305
P.S. I was in fact able to reproduce the error by separatly creating a new GeoPackage and import a dwg in it; the same dwg is imported with no errors when the geopackage is created directly in the importing dialog.

Error showing at tAccessInput component

While using tAccessInput component in my job, it showing error like,
It may not be a database that your application recognizes, or the file may be corrupt.
But, it all the connections and database/table names are valid in my job.
What can be the problem. and how can i resolve it.
Metioning the exact DBVersion is more important for tAccessInput/tAccessOutput.
Like Access 2003/Access 2007 and associated database file name.