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

ValueError: badly formed hexadecimal UUID string #1

Open
Rajashan opened this issue Jul 8, 2019 · 1 comment
Open

ValueError: badly formed hexadecimal UUID string #1

Rajashan opened this issue Jul 8, 2019 · 1 comment

Comments

@Rajashan
Copy link

Rajashan commented Jul 8, 2019

When trying to start a new project, I get the following. I train using the modified version of Opennmt-py and supply paths to text files.

builtins.ValueError

ValueError: badly formed hexadecimal UUID string
Traceback (most recent call last)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__

    return self.wsgi_app(environ, start_response)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app

    response = self.handle_exception(e)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception

    reraise(exc_type, exc_value, tb)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise

    raise value

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app

    response = self.full_dispatch_request()

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request

    rv = self.handle_user_exception(e)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception

    reraise(exc_type, exc_value, tb)

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise

    raise value

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request

    rv = self.dispatch_request()

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

    File "/home/Desktop/neurox/NeuroX/src/app.py", line 235, in analyze

    project = database.Project.get(database.Project.id == uuid.UUID(project_id))

    File "/home/anaconda3/envs/neurox-env/lib/python3.6/uuid.py", line 140, in __init__

    raise ValueError('badly formed hexadecimal UUID string')

    ValueError: badly formed hexadecimal UUID string

This is on both firefox and chrome and I am running Ubuntu.

@pdhung3012
Copy link

pdhung3012 commented Oct 20, 2020

Hi I have the same problem. I investigate this issue and see that it is due to the generated project ID doesn't have 32 bits format. I fix it and it can go to the analyze page but the new page shows "Project not found". I am checking more on that.
Add the following code to line 235:

newProjectId = project_id; newHexId = int(newProjectId, 16); newHexStr = '{0:032X}'.format(newHexId); project = database.Project.get(database.Project.id == uuid.UUID(newHexStr))

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

No branches or pull requests

2 participants