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

when I use nebula3-python(version:3.1.0) to connect nebula3.2.0 "Unexpected type for skipping xxx" happened #236

Open
daidai0235 opened this issue Nov 2, 2022 · 7 comments
Labels
affects/none PR/issue: this bug affects none version. severity/minor Severity of bug type/bug Type: something is unexpected

Comments

@daidai0235
Copy link

This Exception raised from nebula3.fbthrift.TProtocol.TProtocolBase,TTYPE has attrs 0-19,but "xxx" can be 34、58、44、123、92、117、34、108、116 and more.

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Would you mind sharing a detailed reproduce process so that others could try helping on this?

@daidai0235
Copy link
Author

daidai0235 commented Nov 2, 2022

    @awaitable
    def initialize(self, conf):
        self.conf = conf
        configer = Config()
        configer.max_connection_pool_size = self.conf.get('max_size', 1)
        self._pool = ConnectionPool()
        self._pool.init(self.conf['addresses'], configer)

    @awaitable
    def execute(self, command, method=None):
        begin_time = time.time()
        try:
            self.session = self._pool.get_session(self.conf['user'], self.conf['password'])
            while True:
                resultset = self.session.execute(command)  # raised from
                err_code, result = self.parseResultSet(resultset, method)
                if err_code:
                    if err_code == -1009:
                        self.session.execute('use frfr;')
                    else:
                        raise Exception(result)
                else:
                    break
            return result
        except Exception as e:
            raise e
async def _get_frame_info(self, frames_str):
        command = f'FETCH PROP ON frame {frames_str} YIELD id(vertex) as id, properties(vertex).ip as ip, ' \
                  f'properties(vertex).type_statistics as type_statistics'
        result = await self.execute(command, method='frame')

@daidai0235
Copy link
Author

@daidai0235
Copy link
Author

nebula3-python version=3.3.0 has no problem above

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Strange, are you using the session pool from 3.3.0 or everything is the same but for the version of nebula-python?

Also, plz be noted that nebula-python is not thread-safe.

@daidai0235
Copy link
Author

yes,I am using the session pool from 3.3.0

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

ok, it may be related to how session was created/shared among requests before?
cc @Aiee

@Sophie-Xie Sophie-Xie added the type/bug Type: something is unexpected label Nov 30, 2022
@HarrisChu HarrisChu added affects/none PR/issue: this bug affects none version. severity/none Severity of bug severity/minor Severity of bug labels Dec 1, 2022
@github-actions github-actions bot removed the severity/none Severity of bug label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/minor Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants