Doccano: Invalid Postgress Host on Azure Deploy

Created on 18 Jun 2019  ·  3Comments  ·  Source: doccano/doccano

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Azure
  • Python version: N/A

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug or a feature request.

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

self._wrapped = Settings(settings_module)
2019-06-18T08:13:35.564035712Z   File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 107, in __init__
2019-06-18T08:13:35.564040112Z     mod = importlib.import_module(self.SETTINGS_MODULE)
2019-06-18T08:13:35.564044312Z   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
2019-06-18T08:13:35.564048712Z     return _bootstrap._gcd_import(name[level:], package, level)
2019-06-18T08:13:35.564053012Z   File "", line 994, in _gcd_import
2019-06-18T08:13:35.564057412Z   File "", line 971, in _find_and_load
2019-06-18T08:13:35.564061912Z   File "", line 955, in _find_and_load_unlocked
2019-06-18T08:13:35.564066212Z   File "", line 665, in _load_unlocked
2019-06-18T08:13:35.564070612Z   File "", line 678, in exec_module
2019-06-18T08:13:35.564075012Z   File "", line 219, in _call_with_frames_removed
2019-06-18T08:13:35.564080012Z   File "/doccano/app/app/settings.py", line 245, in 
2019-06-18T08:13:35.564084612Z     ssl_require='sslmode' not in furl(env('DATABASE_URL', '')).args,
2019-06-18T08:13:35.564088912Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1310, in __init__
2019-06-18T08:13:35.564093212Z     self.load(url)  # Raises ValueError on invalid url.
2019-06-18T08:13:35.564097412Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1337, in load
2019-06-18T08:13:35.564101712Z     self.netloc = tokens.netloc  # Raises ValueError in Python 2.7+.
2019-06-18T08:13:35.564106012Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1801, in __setattr__
2019-06-18T08:13:35.564111312Z     object.__setattr__(self, attr, value)
2019-06-18T08:13:35.564115613Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1464, in netloc
2019-06-18T08:13:35.564125813Z     self.host = host
2019-06-18T08:13:35.564131113Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1801, in __setattr__
2019-06-18T08:13:35.564135513Z     object.__setattr__(self, attr, value)
2019-06-18T08:13:35.564139613Z   File "/usr/local/lib/python3.6/site-packages/furl/furl.py", line 1379, in host
2019-06-18T08:13:35.564144013Z     raise ValueError(errmsg % (host, INVALID_HOST_CHARS))
2019-06-18T08:13:35.564148213Z ValueError: Invalid host '[email protected]'. Host strings must have at least one non-period character, can't contain any of '!@#$%^&'"*()+=:;/', and can't have adjacent periods.

@c-w I'm seeing the following behavior on deployment how are you generating the host name for postgress? It seems like this is a rare case bus should still be addressed.

question

All 3 comments

Looks like there's a non URL safe character in the password which breaks the connection URI parsing. Please ensure that there are no special URL characters in the password or that the special characters are URL-encoded.

Makes sense will investigate string validation.

Looks like there's a non URL safe character in the password which breaks the connection URI parsing. Please ensure that there are no special URL characters in the password or that the special characters are URL-encoded.

I confirm that was the issue for me as well - after changing password generator settings to avoid special characters, deployment has been completed successfully

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atakanokan picture atakanokan  ·  4Comments

cohen-ori picture cohen-ori  ·  4Comments

fangd123 picture fangd123  ·  3Comments

ayrtondenner picture ayrtondenner  ·  3Comments

rebby123 picture rebby123  ·  3Comments