Open
Description
I'm using Sequel Pro 1.0.2 Build 4096. For the last couple of days, the format SQL bundle has stopped working with the following error message:
Unauthorized request, please contact support@dpriver.com a free account.
Here is a screenshot:
Can you provide some pointers as to what could have gone wrong and what might be a possible fix?
Activity
sqlparser commentedon Sep 18, 2014
Format SQL bundle in Sequel Pro use free sql formatter service from:
http://www.dpriver.com/pp/sqlformat.htm
Access to this free sql formatter service via webpage is available as usual, however Sequel Pro access this service via API which was move to a new site:
https://github.com/sqlparser/sql-pretty-printer/wiki/SQL-FaaS#2-api
So something changes should be made in this file:
https://github.com/sequelpro/Bundles/blob/master/core/Format%20SQL.spBundle/command.plist
I'm author of this sql formatter from dpriver.com, feel free to let me know if anything I can do when migrate to use this new sql formatter service, btw, this sql formatter service is free as usual.
James
[-]Format SQL Bundle Error[/-][+]Update endpoint URL for SQL formatter[/+][-]Update endpoint URL for SQL formatter[/-][+]Update SQL formatter bundle for new API[/+]dmoagx commentedon Sep 18, 2014
I wouldn't say we use an API, but rather parse the result from the HTML response page, so this might need a substantial rewrite.
James: BTW Thanks for your e-mail reminder, Sequel Pro development just isn't very active at the moment.
I hope this isn't causing any problems for you.
gerrior commentedon Oct 9, 2014
The problem has morphed into "Please refresh this page to load the latest version 4.0"
minaevd commentedon Oct 27, 2014
Here is the fix, no development required.
All you have to do is to change the clientid key in the Bundles editor:
*) open Sequel Pro application
*) go to Bundles -> Bundle Editor
*) Use left pane, Select "Input field" (Show), choose Format SQL
*) find the following row in the "Command" textarea:
*) replace the value of the input to "dpriver-9094-8133-2031", so the new line is:
*) Click "Save"
It works for me.
Dmitry
Mirocow commentedon Nov 7, 2014
Replace for this code
temirov commentedon Nov 26, 2014
Tnx, @minaevd ! replace the value of the input to "dpriver-9094-8133-2031", so the new line is:
<input type="hidden" name="clientid" value="dpriver-9094-8133-2031" />
That did it for me
jwg2s commentedon Jan 26, 2015
👍 this would be awesome if it could be pushed out! One of my favorite, no-longer-working sequel pro features.
mrardon commentedon Jan 26, 2015
@jwg2s Just follow directions in workaround above by @minaevd. Works for me.
jwg2s commentedon Jan 26, 2015
I copy pasted the code from @minaevd but now it just deletes the entire query.
jwg2s commentedon Jan 26, 2015
Copied from a fresh install, must be a formatting issue with Github or something. All well now!
mrardon commentedon Jan 26, 2015
Dont think you are looking at @minaevd's response.
Shouldn't be much formatting. On line 149 of a clean install change that line to be:
<input type="hidden" name="clientid" value="dpriver-9094-8133-2031" />
The only thing you are replacing is the part before-9094-8133-2031
and that becomesdpriver
instead of the number in there currently.gagaboy commentedon Apr 14, 2015
now the code below does work!!
20 remaining items
naillizard commentedon Aug 19, 2018
naillizard commentedon Aug 21, 2018
@peh great man, have't used python in a while... could not remember the api... was a shot in the dark!
Cheers for fixing it.
akaramires commentedon Jan 9, 2019
Thank you!
muffinmad commentedon Apr 5, 2019
Modified solution from @peh to avoid new line at the end
MISSDAURIS commentedon Nov 6, 2019
Hello!
I´ve tried both options that I have seen:
resulted in a BASH error.
The other code changing line 149 from the original to
<input type="hidden" name="clientid" value="dpriver-9094-8133-2031" />
resulted in a pop up showing me please wait and nothing happens.
Am using Sequel Pro Nightly Build 5446 (97c1b85)
Please help!!
naillizard commentedon Nov 7, 2019
naillizard commentedon Nov 20, 2019
@MISSDAURIS try solution above from @muffinmad
masciugo commentedon Dec 6, 2019
I installed python with home brew and I can successfully use sqlparse from console:
but in my bundle script:
I got:
any idea why?
muffinmad commentedon Dec 6, 2019
@masciugo You run python3 from console but likely python2 with:
Try
in your bundle script
lcsqlpete commentedon Mar 19, 2020
The sqlformat/php solution doesn't work for me. All I get is another window with the original unformatted code in it
stale commentedon Jul 2, 2020
This project is not maintained anymore and was replaced. Please see #3705.