Closed gtitov closed 1 year ago
Hi, thanks for the cool package.
I encountered the same problem @gtitov mentioned, but with the create_coveragestore function.
requests==2.28.1
geoserver-rest==2.4.0
I'd be happy to help fixing, but I've never contributed on any github project, so I'm not quite sure how to start.
Hi @Kilometerfresserin and @gtitov, could you please use the latest version v2.4.0
. I think this issue was solved with the latest release.
Hi @iamtekson. Thanks for the quick reply.
I have double-checked my version and I'm sure I'm already running on 2.4.0.
I believe it has been solved for the get_status
method that @gtitov mentioned (at least that one works fine for me), but it still occurs with create_coveragestore
method.
Again, I'd be happy to provide the bugfix myself, if that is okay with you.
Hi @Kilometerfresserin, Please go ahead and fix the bug. I will merge it. But before doing that, could you please provide the error message on this issue or create new issue?
I've just encountered the same problem with geoserver-rest==2.4.0
:
import os
from geo.Geoserver import Geoserver
from config import SETTINGS
geo = Geoserver(
"https://my/geoserver/url",
username=SETTINGS.GEOSERVER_USER,
password=SETTINGS.GEOSERVER_PASSWORD,
)
fpath = r"/path/to/my_file.tif"
fname = os.path.basename(fpath)
layer_name = os.path.splitext(fname)[0]
status = geo.create_coveragestore(
layer_name=layer_name, path=fpath, workspace="my_workspace"
)
print(status)
Gives the following error:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
If I downgrade to version 2.3.4, everything works OK.
Thank you for reporting it. I will have a look and fix the things soon. After that, we can close this issue.
Hi @Kilometerfresserin, Please go ahead and fix the bug. I will merge it. But before doing that, could you please provide the error message on this issue or create new issue?
Hi @iamtekson I've checked out main branch, branched from it it and fixed the issue, but I seem to lack permission to publish the new branch:
jw@MacBook-Pro geoserver-rest % git push -u origin issue_86_missing_application_json
remote: Permission to gicait/geoserver-rest.git denied to Kilometerfresserin.
fatal: unable to access 'https://github.com/gicait/geoserver-rest.git/': The requested URL returned error: 403
Maybe I haven't understood github (I've only worked with self-hosted gitlab instances so far) - could someone please explain how to do this correctly around here?
@Kilometerfresserin It is likely that only "core" project contributors have permissions to create and publish branches on the original repository. Instead, you should first "fork" the repository, which creates a copy of the original linked to your own GitHub profile. You can then create a branch on your fork, make changes and commit them to your branch. Finally, make a pull request from the original repository by comparing with changes on your branch. See e.g. here and here.
Good luck!
Hey! Thanks for a great product!
Description
Geoserver API doesn't return a JSON-response to a request in the
get_status()
method of the Geoserver class. So return of the method doesn't produce a valid output. I'm not sure if it is only my specific problem because theget_system_status()
method works just fine with a similar request.Code to reproduce
Output (truncated)
Possible solution
Add a header to ensure json return.