In general it’s good to keep discussion about tools like gsconfig.py on public fora - someone else on the GeoServer users list may also know something about your problem!
I haven’t used image pyramids in gsconfig before, but I expect it will work fine. In general, when investigating new operations for gsconfig I prepare a layer as desired in the GeoServer WEB UI and then inspect it using the REST API in curl, a browser, or gsconfig itself.
I also don’t often test on Windows, so I don’t know what the problem may be. Perhaps the way you have installed gsconfig has modified the source code in some way; for example, git may be altering the line endings during checkout. I am aware of some successful gsconfig users on Windows so I’m sure this issue can be resolved with a little research.
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
First of all, thank you so much for taking the time to reply to my e-mail. I appreciate it. I have been working on this for weeks and not getting anywhere, partly I guess because I am incompetent with this stuff. I did look over the examples, but they didn;t seem to do anything I needed to do. I started looking over your catalogtests.py and I tried this:
This crashed in the create_coveragestore2 call. Do I need to create a workspace first? Can you possibly provided me some quick sample code to create an Image Pyramid store and layer and publish that layer?
Thanks!
Katie
···
On Thu, Dec 6, 2012 at 8:53 AM, Katie Essadro <[hidden email]> wrote:
Can gsconfig.py be used to automatically add a store and layer into
Geoserver, or do I need to do that first manually?
Is there anyway to automatically create a store and layer through the API?
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
where "aiptest1" is the name of the store I want to create, and "cable" is
the name of my workspace. I get this error:
builtins.NameError: global name 'basestring' is not defined
File
"C:\Python32\Lib\site-packages\gsconfig-0.6.1-py3.2.egg\geoserver\catalog.py",
line 192, in get_store
if isinstance(workspace, basestring):
Am I stupid, or is this incredibly difficult to use?
No, I don’t know of anyone using gsconfig to operate on pyramid stores. To my knowledge, it should be possible, but I don’t have an example.
‘self’ is going to be provided by Python, you don’t need to pass a value in your own code. data can be one of:
path to a ZIP archive or single-file coverage file (like a tiff.)
already-opened zip-archive or single-file coverage file
dict of files by extension which will be zipped up and uploaded (like: { ‘tfw’: ‘/path/to/file.tfw’, ‘tif’: ‘/path/to/file.tif’ })
I don’t think it’s common practice to upload a pyramid through the REST API so you will probably have better luck with create_coveragestore2 (which allows you to specify a path to a file already on the server.). When you use create_coveragestore2 what sort of ‘crash’ do you see? Can you post the error message? I think all you need to do may be to add (before saving):
Sent from the GeoServer - User mailing list archive at Nabble.com.
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
builtins.NameError: global name 'basestring' is not defined
File
"C:\Python32\Lib\site-packages\gsconfig-0.6.1-py3.2.egg\geoserver\catalog.py",
line 240, in create_coveragestore2
if isinstance(workspace, basestring):
Well, gsconfig.py is not a very mature library - it is developed first for the needs of the GeoNode project and if it turns out to be useful for others like you, that’s great. But it is definitely rough around the edges (and actually getting worse as the GeoServer REST API expands and the very small body of gsconfig developers is not able to keep up.) So yes, it’s difficult to use (I wouldn’t say “incredibly,” but perhaps I am in a biased position.)
This latest error is due to you running on Python 3, which gsconfig has not yet been tested with. Apparently some development work is needed to reach compatibility - if you are able to downgrade to Python 2.7 that would probably be the most expedient approach, but if you’re interested in helping to bring gsconfig up to Python 3 compatibility we’d appreciate the help.
where “aiptest1” is the name of the store I want to create, and “cable” is
the name of my workspace. I get this error:
builtins.NameError: global name ‘basestring’ is not defined
File
“C:\Python32\Lib\site-packages\gsconfig-0.6.1-py3.2.egg\geoserver\catalog.py”,
line 192, in get_store
if isinstance(workspace, basestring):
Am I stupid, or is this incredibly difficult to use?
Sent from the GeoServer - User mailing list archive at Nabble.com.
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
This will only create the store, a layer will not be created. The store will
be created in the default workspace regardless of the workspace name you
specify...
builtins.NameError: global name 'basestring' is not defined
File
"C:\Python32\Lib\site-packages\gsconfig-0.6.1-py3.2.egg\geoserver\catalog.py",
line 240, in create_coveragestore2
if isinstance(workspace, basestring):
I finally got a store created, but I am checking your test code, and I dont
see anywhere to create a layer and associated it with a store and then
publish that layer. Can you please point me in the right direction???