-
Notifications
You must be signed in to change notification settings - Fork 2
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
Client Error: Bad Request #8
Comments
first try to go to http://127.0.0.1:45869/add_tags/get_tag_services you may get response like below {
"local_tags" : [ "my tags" ]
"tag_repositories" : [ "public tag repository", "mlp fanfic tagging server" ]
} if your so your command should be similar to below iqdb-tagger search-hydrus-and-send-tag --tag_repo 'my tags' ... e: docs on hdyrus api docs https://hydrusnetwork.github.io/hydrus/help/client_api.html#add_tags_get_tag_services |
Okay after some trying i made it work. I realized after a while "my tags" in the command line has to be "my_tags" or it won't take it. It didn't work at first since I had to also rename "my tags" in Hydrus into "my_tags" logically. Also is this "Converting to JPEG for error fix err=cannot write mode RGBA as JPEG" a problem? dont really know what it tries to do there. |
is it not caused by windows argument not escaping space character?
some booru from iqdb also don't have tag parser because the site have javascript page or login requirement i'm planning not only it upload the image but it also use url data on that image and send it to iqdb. if you are running from source you can edit argument iqdb_tagger/iqdb_tagger/__main__.py Line 485 in 20151f2
if it is from the same site, rather than send tag maybe send url. if hydrus can match the url it should not download the image but only parse the tag using hydrus parser
it is a temp fix from old commit. i will set that as debug message to decrease the program verbosity in future commit e: error message is skipped on new commits. i also add |
no idea about that. but changing the name worked fine enough.
how is the line supposed to look? I tried it with just: |
that is the correct subcommand |
Hi, thanks to the other user, who asked the runtime error question, I at least could make it basically run. But when I try running the command i get this error:
2020-09-19 10:18.20 Metadata hash=74d725726d9da7f14f718d48bb0a94826286167c6d5594fc52e81c07db271fd7 id=23408617 idx=0 total=16
2020-09-19 10:18.20 Converting to JPEG for error fix err=cannot write mode RGBA as JPEG
tags found and so on
2020-09-19 10:18.48 match parser=<class 'iqdb_tagger.custom_parser.ChanSankakuParser'>
2020-09-19 10:18.48 34 tag(s) founds
Traceback (most recent call last):
File "c:\python38\lib\site-packages\hydrus_init_.py", line 191, in _api_request
response.raise_for_status()
File "c:\python38\lib\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://127.0.0.1:45869/add_tags/add_tags
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Python38\Scripts\iqdb-tagger.exe_main.py", line 7, in
File "c:\python38\lib\site-packages\click\core.py", line 829, in call
return self.main(*args, **kwargs)
File "c:\python38\lib\site-packages\flask\cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "c:\python38\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\python38\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python38\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\python38\lib\site-packages\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\python38\lib\site-packages\flask\cli.py", line 426, in decorator
return ctx.invoke(f, *args, **kwargs)
File "c:\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\python38\lib\site-packages\iqdb_tagger_main.py", line 566, in search_hydrus_and_send_tag
cl.add_tags([f_hash], service_to_tags={tag_repo: full_name_tags})
File "c:\python38\lib\site-packages\hydrus_init.py", line 319, in add_tags
self.api_request("POST", self.ADD_TAGS_ROUTE, json=json)
File "c:\python38\lib\site-packages\hydrus_init.py", line 194, in _api_request
raise MissingParameter(response)
hydrus.MissingParameter: Could not find the service "local tags"!
The text was updated successfully, but these errors were encountered: