Skip to content

ValueError #4

Open
Open
@pyaepyaelily

Description

@pyaepyaelily

I can solve most of the problem with your code and I'm not sure this is relevant to this. I have this error ValueError: cannot use LOCALE flag with a str pattern. My error message is below.

Traceback (most recent call last):
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1994, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\Ma Pyae Sone Khin\Desktop\chatbot-master\main.py", line 16, in ask
kernel = aiml.Kernel()
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\aiml\Kernel.py", line 35, in init
self._brain = PatternMgr()
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\site-packages\aiml\PatternMgr.py", line 27, in init
self._whitespaceRE = re.compile("\s+", re.LOCALE | re.UNICODE)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\re.py", line 233, in compile
return _compile(pattern, flags)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\sre_parse.py", line 865, in parse
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "C:\Users\Ma Pyae Sone Khin\AppData\Local\Programs\Python\Python36\lib\sre_parse.py", line 832, in fix_flags
raise ValueError("cannot use LOCALE flag with a str pattern")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions