Skip to content
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

Error appears while opening SMARTS file with query which contains comma #1310

Closed
urszula-gawlowska opened this issue Oct 9, 2023 · 0 comments · Fixed by #1327
Closed

Error appears while opening SMARTS file with query which contains comma #1310

urszula-gawlowska opened this issue Oct 9, 2023 · 0 comments · Fixed by #1327
Assignees
Projects

Comments

@urszula-gawlowska
Copy link
Collaborator

urszula-gawlowska commented Oct 9, 2023

Steps to Reproduce

  1. Launch "Ketcher"
  2. Draw a Benzene
  3. Double click on the Benzene to open 'Atom properties' menu
  4. Open 'Query properties' submenu
  5. Set up values for few properties
  6. Scroll down and mark 'Custom query' option
  7. Replace any semicolon with a comma
  8. Click 'Apply' button
  9. Click 'Save as' button
  10. Set file format to 'Daylight SMARTS'
  11. Click 'Save' button
  12. Click 'Open' button
  13. Click 'Open from file' button
  14. Choose smarts file with comma which was created at step 11.
  15. Click 'Add to canvas' button

Expected behavior
File open properly without errors

Actual behavior
File is not open and error message appears:
Convert error! Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Request with 502 status code appears:
Payload:

{
  "struct": "[#6]1-[#6]=[#6]-[#6]=[#6]-[b;r;3;s&2,X3]=1",
  "output_format": "chemical/x-indigo-ket",
  "options": {
    "smart-layout": true,
    "ignore-stereochemistry-errors": true,
    "mass-skip-error-on-pseudoatoms": false,
    "gross-formula-add-rsites": true,
    "aromatize-skip-superatoms": true,
    "dearomatize-on-load": false,
    "ignore-no-chiral-flag": false
  }
}

Response:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>The page is temporarily unavailable</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <style type="text/css">
            /*<![CDATA[*/
            body {
                background-color: #fff;
                color: #000;
                font-size: 0.9em;
                font-family: sans-serif,helvetica;
                margin: 0;
                padding: 0;
            }
            :link {
                color: #c00;
            }
            :visited {
                color: #c00;
            }
            a:hover {
                color: #f50;
            }
            h1 {
                text-align: center;
                margin: 0;
                padding: 0.6em 2em 0.4em;
                background-color: #294172;
                color: #fff;
                font-weight: normal;
                font-size: 1.75em;
                border-bottom: 2px solid #000;
            }
            h1 strong {
                font-weight: bold;
                font-size: 1.5em;
            }
            h2 {
                text-align: center;
                background-color: #3C6EB4;
                font-size: 1.1em;
                font-weight: bold;
                color: #fff;
                margin: 0;
                padding: 0.5em;
                border-bottom: 2px solid #294172;
            }
            h3 {
                text-align: center;
                background-color: #ff0000;
                padding: 0.5em;
                color: #fff;
            }
            hr {
                display: none;
            }
            .content {
                padding: 1em 5em;
            }
            .alert {
                border: 2px solid #000;
            }

            img {
                border: 2px solid #fff;
                padding: 2px;
                margin: 2px;
            }
            a:hover img {
                border: 2px solid #294172;
            }
            .logos {
                margin: 1em;
                text-align: center;
            }
            /*]]>*/
        </style>
    </head>

    <body>
        <h1><strong>nginx error!</strong></h1>

        <div class="content">

            <h3>The page you are looking for is temporarily unavailable.  Please try again later.</h3>

            <div class="alert">
                <h2>Website Administrator</h2>
                <div class="content">
                    <p>Something has triggered an error on your
                    website.  This is the default error page for
                    <strong>nginx</strong> that is distributed with
                    Amazon Linux 2.  It is located
                    <tt>/usr/share/nginx/html/50x.html</tt></p>

                    <p>You should customize this error page for your own
                    site or edit the <tt>error_page</tt> directive in
                    the <strong>nginx</strong> configuration file
                    <tt>/etc/nginx/nginx.conf</tt>.</p>

                </div>
            </div>

            <div class="logos">
                <a href="http://nginx.net/"><img
                    src="/nginx-logo.png"
                    alt="[ Powered by nginx ]"
                    width="121" height="32" /></a>

                <a href="https://amazonlinux.com/"><img 
                    src="/poweredby.png"
                    alt="[ Powered by Amazon Linux 2 ]" 
                    width="88" height="31" /></a>
            </div>
        </div>
    </body>
</html>

Attachments
Example of smarts file:
smarts_with_comma.zip

smarts_with_comma_error

Indigo/Bingo version
Version 1.11.0-rc.1.72-g5c14b0708-x86_64-linux-gnu-11.4.0

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Indigo
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants