ValueError: badly formed hexadecimal UUID string
Rajashan opened this issue · 1 comments
Rajashan commented
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 commented
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))