could not establish connection DETAIL: fe_sendauth: no password supplied
Request Method: | GET |
---|---|
Request URL: | http://www.transparencia.eco.br:8001/pm0804/fornecedorselecionado/000280/ |
Django Version: | 1.9 |
Exception Type: | DatabaseError |
Exception Value: | could not establish connection DETAIL: fe_sendauth: no password supplied |
Exception Location: | /usr/lib/python3/dist-packages/psycopg2/extras.py in execute, line 123 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.4.3 |
Python Path: | ['/var/www/transparencia', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | Sex, 29 Mar 2024 11:20:14 -0300 |
/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py
in get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
resolver | <RegexURLResolver 'infotec.urls' (None:None) ^/> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f57581cbb70> |
response_is_rendered | False |
wrapped_callback | <function fornecedorselecionado at 0x7f574bd3d488> |
callback | <function fornecedorselecionado at 0x7f574bd3d488> |
response | None |
callback_kwargs | {'_idfornecedor': '000280'} |
urlconf | 'infotec.urls' |
request | <WSGIRequest: GET '/pm0804/fornecedorselecionado/000280/'> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f5750068ef0>> |
resolver_match | ResolverMatch(func=transparencia.views.fornecedorselecionado, args=(), kwargs={'_idfornecedor': '000280'}, url_name=fornecedorselecionado, app_names=[], namespaces=[]) |
callback_args | () |
/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py
in get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
resolver | <RegexURLResolver 'infotec.urls' (None:None) ^/> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f57581cbb70> |
response_is_rendered | False |
wrapped_callback | <function fornecedorselecionado at 0x7f574bd3d488> |
callback | <function fornecedorselecionado at 0x7f574bd3d488> |
response | None |
callback_kwargs | {'_idfornecedor': '000280'} |
urlconf | 'infotec.urls' |
request | <WSGIRequest: GET '/pm0804/fornecedorselecionado/000280/'> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f5750068ef0>> |
resolver_match | ResolverMatch(func=transparencia.views.fornecedorselecionado, args=(), kwargs={'_idfornecedor': '000280'}, url_name=fornecedorselecionado, app_names=[], namespaces=[]) |
callback_args | () |
/var/www/transparencia/transparencia/views.py
in fornecedorselecionado
def fornecedorselecionado(request, _idfornecedor=0):
ler_config(request)
SQL = "select idpessoa,nmpessoa,coalesce(cpf,0) as cpf,coalesce(cnpj,0) as cnpj from view_pe_pessoas" \
" where idpessoa=" + str(_idfornecedor)
conn = psycopg2.connect(request.session['connectDB'])
cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
cur.execute(SQL)...
lista = cur.fetchall()
novo = fornecedor()
for nome in lista:
novo.idpessoa = '{0:06}'.format(int(nome['idpessoa']))
novo.nmpessoa = nome['nmpessoa']
Variable | Value |
---|---|
conn | <connection object at 0x7f5749b11570; dsn: 'host=localhost port=5432 dbname=infotec_2013_pm0804 user=postgres password=xxxxxxx', closed: 0> |
SQL | ('select idpessoa,nmpessoa,coalesce(cpf,0) as cpf,coalesce(cnpj,0) as cnpj ' 'from view_pe_pessoas where idpessoa=000280') |
_idfornecedor | '000280' |
request | <WSGIRequest: GET '/pm0804/fornecedorselecionado/000280/'> |
cur | <cursor object at 0x7f5749bc4af0; closed: 0> |
/usr/lib/python3/dist-packages/psycopg2/extras.py
in execute
kwargs['row_factory'] = DictRow
DictCursorBase.__init__(self, *args, **kwargs)
self._prefetch = 1
def execute(self, query, vars=None):
self.index = {}
self._query_executed = 1
return _cursor.execute(self, query, vars)...
def callproc(self, procname, vars=None):
self.index = {}
self._query_executed = 1
return _cursor.callproc(self, procname, vars)
Variable | Value |
---|---|
query | ('select idpessoa,nmpessoa,coalesce(cpf,0) as cpf,coalesce(cnpj,0) as cnpj ' 'from view_pe_pessoas where idpessoa=000280') |
self | <cursor object at 0x7f5749bc4af0; closed: 0> |
vars | None |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
SERVER_NAME | 'www.transparencia.eco.br' |
HTTP_REFERER | 'http://www.transparencia.eco.br:8001/pm0804/fornecedorselecionado/000280' |
SERVER_SOFTWARE | 'Apache/2.4.7 (Ubuntu)' |
REQUEST_METHOD | 'GET' |
wsgi.errors | <_io.TextIOWrapper encoding='utf-8'> |
wsgi.file_wrapper | '' |
CONTEXT_DOCUMENT_ROOT | '/var/www' |
DOCUMENT_ROOT | '/var/www' |
SERVER_PROTOCOL | 'HTTP/1.1' |
mod_wsgi.callable_object | 'application' |
SERVER_PORT | '8001' |
REQUEST_SCHEME | 'http' |
REMOTE_PORT | '36536' |
REQUEST_URI | '/pm0804/fornecedorselecionado/000280/' |
wsgi.input | <mod_wsgi.Input object at 0x7f5749a655f0> |
SERVER_SIGNATURE | ('<address>Apache/2.4.7 (Ubuntu) Server at www.transparencia.eco.br Port ' '8001</address>\n') |
mod_wsgi.handler_script | '' |
mod_wsgi.process_group | 'transparencia' |
QUERY_STRING | '' |
wsgi.url_scheme | 'http' |
REMOTE_ADDR | '3.234.212.253' |
HTTP_HOST | 'www.transparencia.eco.br:8001' |
HTTP_USER_AGENT | 'claudebot' |
wsgi.multithread | True |
mod_wsgi.enable_sendfile | '0' |
PATH_INFO | '/pm0804/fornecedorselecionado/000280/' |
SCRIPT_FILENAME | '/var/www/transparencia/infotec/wsgi.py' |
mod_wsgi.listener_host | '' |
mod_wsgi.input_chunked | '0' |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
CONTEXT_PREFIX | '' |
wsgi.multiprocess | False |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.application_group | 'transparencia.eco.br:8001|' |
mod_wsgi.script_reloading | '1' |
PATH_TRANSLATED | '/var/www/transparencia/infotec/wsgi.py/pm0804/fornecedorselecionado/000280/' |
SCRIPT_NAME | '' |
wsgi.run_once | False |
GATEWAY_INTERFACE | 'CGI/1.1' |
SERVER_ADMIN | 'infotec@infotecbg.com.br' |
mod_wsgi.queue_start | '1711722013802118' |
mod_wsgi.listener_port | '8001' |
mod_wsgi.version | (3, 4) |
SERVER_ADDR | '192.168.24.103' |
infotec.settings
Setting | Value |
---|---|
MIDDLEWARE_CLASSES | ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware') |
DATABASE_ROUTERS | [] |
SECURE_SSL_HOST | None |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
MIGRATION_MODULES | {} |
ROOT_URLCONF | 'infotec.urls' |
SECURE_REDIRECT_EXEMPT | [] |
EMAIL_USE_SSL | False |
USE_I18N | True |
CSRF_COOKIE_AGE | 31449600 |
WSGI_APPLICATION | 'infotec.wsgi.application' |
DECIMAL_SEPARATOR | '.' |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
SECRET_KEY | '********************' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
LOGGING_CONFIG | 'logging.config.dictConfig' |
SECURE_PROXY_SSL_HEADER | None |
FORCE_SCRIPT_NAME | None |
DEFAULT_TABLESPACE | '' |
MANAGERS | [] |
NUMBER_GROUPING | 0 |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
SECURE_BROWSER_XSS_FILTER | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
ADMINS | [] |
MEDIA_ROOT | '/var/www/transparencia/media' |
ABSOLUTE_URL_OVERRIDES | {} |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': 'localhost', 'NAME': 'transp_site', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '5432', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'postgres'}} |
SECURE_CONTENT_TYPE_NOSNIFF | False |
DEFAULT_CONTENT_TYPE | 'text/html' |
CACHE_MIDDLEWARE_SECONDS | 600 |
DEFAULT_INDEX_TABLESPACE | '' |
EMAIL_HOST_PASSWORD | '********************' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
CSRF_COOKIE_HTTPONLY | False |
MONTH_DAY_FORMAT | 'F j' |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FORMAT_MODULE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
FILE_UPLOAD_TEMP_DIR | None |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
DEBUG_PROPAGATE_EXCEPTIONS | False |
SESSION_COOKIE_NAME | 'sessionid' |
DATETIME_FORMAT | 'N j, Y, P' |
DATE_FORMAT | 'N j, Y' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
AUTH_USER_MODEL | 'auth.User' |
EMAIL_SSL_CERTFILE | None |
EMAIL_USE_TLS | False |
IGNORABLE_404_URLS | [] |
SERVER_EMAIL | 'root@localhost' |
CSRF_COOKIE_PATH | '/' |
FILE_UPLOAD_PERMISSIONS | None |
EMAIL_HOST | 'localhost' |
STATIC_ROOT | None |
DEFAULT_CHARSET | 'utf-8' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
EMAIL_PORT | 25 |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
SILENCED_SYSTEM_CHECKS | [] |
MEDIA_URL | '/media/' |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
SESSION_COOKIE_DOMAIN | None |
SHORT_DATE_FORMAT | 'm/d/Y' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LANGUAGE_COOKIE_DOMAIN | None |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
LANGUAGE_COOKIE_PATH | '/' |
EMAIL_HOST_USER | '' |
TEMPLATE_LOADERS | ['django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader'] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
PREPEND_WWW | False |
STATICFILES_DIRS | [] |
TEMPLATE_STRING_IF_INVALID | '' |
EMAIL_TIMEOUT | None |
SECURE_SSL_REDIRECT | False |
LANGUAGE_CODE | 'pt-br' |
SESSION_COOKIE_SECURE | False |
LOCALE_PATHS | [] |
THOUSAND_SEPARATOR | ',' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
SETTINGS_MODULE | 'infotec.settings' |
LOGOUT_URL | '/accounts/logout/' |
TIME_ZONE | 'America/Sao_Paulo' |
SESSION_COOKIE_PATH | '/' |
ALLOWED_HOSTS | ['*'] |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
INTERNAL_IPS | [] |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/var/www/transparencia/infotec/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEMPLATE_DIRS | [] |
CRISPY_TEMPLATE_PACK | 'bootstrap3' |
USE_THOUSAND_SEPARATOR | True |
BASE_DIR | '/var/www/transparencia' |
PASSWORD_HASHERS | '********************' |
LANGUAGE_COOKIE_AGE | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
SESSION_FILE_PATH | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
CSRF_TRUSTED_ORIGINS | [] |
USE_X_FORWARDED_PORT | False |
AUTH_PASSWORD_VALIDATORS | '********************' |
DISALLOWED_USER_AGENTS | [] |
USE_ETAGS | False |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
APPEND_SLASH | True |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
INSTALLED_APPS | ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'bootstrap3', 'crispy_forms', 'transparencia', 'olerite', 'infotec') |
TEMPLATE_DEBUG | False |
ALLOWED_INCLUDE_ROOTS | [] |
CSRF_COOKIE_DOMAIN | None |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
USE_X_FORWARDED_HOST | False |
SESSION_COOKIE_AGE | 1209600 |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
STATIC_URL | '/static/' |
SESSION_CACHE_ALIAS | 'default' |
TEMPLATE_CONTEXT_PROCESSORS | ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages'] |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
FILE_CHARSET | 'utf-8' |
USE_TZ | True |
CSRF_COOKIE_NAME | 'csrftoken' |
FIRST_DAY_OF_WEEK | 0 |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
FIXTURE_DIRS | [] |
TIME_FORMAT | 'P' |
LOGIN_URL | '/accounts/login/' |
YEAR_MONTH_FORMAT | 'F Y' |
USE_L10N | True |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
LOGGING | {} |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CSRF_COOKIE_SECURE | False |
DEBUG | True |
SESSION_COOKIE_HTTPONLY | True |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
TEST_NON_SERIALIZED_APPS | [] |
SECURE_HSTS_SECONDS | 0 |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.