Exception: Unexpected character: b'<'

Comments

7 comments

  • Avatar
    JP Harvey

    Hi David, that error typically means there's some other format that's not Thrift being returned. This is typically something like a non-200 HTTP response, so this particular error does not tell us anything very specific about what is going on.

    Side question: what port are you using to connect to OmniSci?

    In order to troubleshoot, it's worth ruling out the cursor as an issue. Instead of using a cursor, are you able to use pandas.readsql to get the results, and we can see if that makes any difference? https://pymapd.readthedocs.io/en/latest/usage.html#pandas-read-sql

    (once we isolate the issue we can work on resolving it permanently)

    0
    Comment actions Permalink
  • Avatar
    David Livingston

    Hi @jpharvey, Thanks for the response. Here is my response and additional question

    Side question: what port are you using to connect to OmniSci? PORT : 443

    And additional question is?

    Daily, I would like to execute series of insert or update query to omnisci. So, I depending on this execute method from pymapd. I hope, I can't achieve this by using pandas.readsql. So, It would be great to know how to overcome this issues? Or What is the cause of the issue? or Any alternative to run insert or update query to omnisci.

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    JP Harvey

    Ok so this error makes a little more sense, if you're connecting through 443 you're probably connecting through a webserver so a non-200 HTTP response is a little more likely.

    If loading data through OmniSci INSERTS are far inferior to doing a columnar load, and in some circumstances will negatively impact performance. Have a look at the load_table method. This is possibly also the best answer to your question here https://community.heavy.ai/t/pymapd-how-to-insert-update-null-or-none-values-using-executemany-method/2338

    UPDATE queries do need to be run as raw SQL as you have been doing, the cause of the issue above is not clear at this point, but ideally we would rule out something to do with the Cursors first.

    What product are you using (open source / AWS AMI / Cloud)?

    0
    Comment actions Permalink
  • Avatar
    David Livingston

    @jpharvey, Product : Cloud

    0
    Comment actions Permalink
  • Avatar
    JP Harvey

    No worries, if you continue to have issues can you please email cloudsupport .. at .. omnisci.com?

    0
    Comment actions Permalink
  • Avatar
    David Livingston

    [quote="DavidLivingston, post:1, topic:2337"] thrift.protocol.TProtocol.TProtocolException: Unexpected character: b’<’ [/quote]

    Hi @jpharvey, We are still experiencing this issue. I've emailed to cloudsupport, sales and initiated chat but we haven't received any response yet.

    Even in OmniSci Immerse, We are not able to run any updates query in "Sql editor" too, If I switch the tab to "Data Manager" then it show popup message as "Failed To Load Tables"

    While running drop query from sql editor in "Omnisci Immerse" received following exception. Exception: Sqlite3 Error: unable to open database file

    Is it any limitation over the current plan? Or Issue related to Cursor? Any suggestion

    I'm looking for any quick solution or work around for the mentioned issue.

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    JP Harvey

    Hi @DavidLivingston I have access to all of those interfaces and am not seeing anything at all from you. I will PM you.

    0
    Comment actions Permalink

Please sign in to leave a comment.