Please tell me how solve this
I try install Install and configure a Sentry Service on a CentOS, and when i try start sentry service i get this error:
[root#felipeurrego ~]# source /var/www/sentry/bin/activate
(sentry)[root#felipeurrego ~]# sentry --config=/etc/sentry.conf.py start
Traceback (most recent call last):
File "/var/www/sentry/bin/sentry", line 8, in <module>
load_entry_point('sentry==5.4.5', 'console_scripts', 'sentry')()
File "/var/www/sentry/lib/python2.6/site-packages/sentry-5.4.5-py2.6.egg/sentry/utils/runner.py", line 197, in main
initializer=initialize_app,
File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/runner.py", line 155, in run_app
management.execute_from_command_line([runner_name, command] + command_args)
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 252, in fetch_command
app_name = get_commands()[subcommand]
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 101, in get_commands
apps = settings.INSTALLED_APPS
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/functional.py", line 184, in inner
self._setup()
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 93, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 68, in load_module
return self._load_module(fullname)
File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 92, in _load_module
load_settings(self.config_path, allow_extras=self.allow_extras, settings=settings_mod)
File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/settings.py", line 49, in load_settings
execfile(mod_or_filename, conf.__dict__)
django.core.exceptions.ImproperlyConfigured: IndentationError('unexpected indent', ('/etc/sentry.conf.py', 58, 1, " SENTRY_URL_PREFIX = 'http://logs.felipeurrego.com'\n"))
And thats all
It's very clear:
django.core.exceptions.ImproperlyConfigured: IndentationError('unexpected indent', ('/etc/sentry.conf.py', 58, 1, " SENTRY_URL_PREFIX = 'http://logs.felipeurrego.com'\n"))
You have a unwarranted space before the configuration variable SENTRY_URL_PREFIX in your /etc/sentry.conf.py. Python requires that everything is uniformly indented in your source code files.
Related
I get this strange error on Python2.7. It works fine with Python3:
Traceback (most recent call last):
File "/home/guettli/descript/projects/descript_jugendhaus/.tox/py27-django14/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/guettli/descript/projects/descript_jugendhaus/.tox/py27-django14/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/guettli/descript/projects/descript_jugendhaus/.tox/py27-django14/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 195, in <module>
distclass=BinaryDistribution,
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/dist_info.py", line 31, in run
egg_info.run()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run
self.find_sources()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
mm.run()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run
self.add_defaults()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
sdist.add_defaults(self)
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
self._add_defaults_ext()
File "/tmp/pip-build-env-sy2MSY/overlay/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 118, in _add_defaults_ext
if self.distribution.has_ext_modules():
File "setup.py", line 109, in has_ext_modules
return super().has_ext_modules() or 'SETUPPY_ALLOW_PURE' not in os.environ
TypeError: super() takes at least 1 argument (0 given)
What could be the root-cause?
I found a solution.
If I disable the python-hunter library it works.
I guess python-hunter is not compatible with Python2.7 any more.
That's fine for my use case. I this case I can remove the library (although it is a great tracing library).
After running PREFIX=/home/hue make install
Towards the end of my hue install via tarball, I get the following error. I'm not sure what is happening. I have the prerequisites installed as well. Using this guide
Command that is failing: /home/hue/hue/build/env/bin/hue makemigrations --noinput
Error:
Traceback (most recent call last):
File "/home/hue/hue/build/env/bin/hue", line 11, in <module>
load_entry_point('desktop', 'console_scripts', 'hue')()
File "/home/hue/hue/desktop/core/src/desktop/manage_entry.py", line 216, in entry
execute_from_command_line(sys.argv)
File "/home/hue/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/home/hue/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/home/hue/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/home/hue/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/hue/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/hue/hue/desktop/core/src/desktop/settings.py", line 271, in <module>
conf.initialize(_desktop_conf_modules, _config_dir)
File "/home/hue/hue/desktop/core/src/desktop/lib/conf.py", line 598, in initialize
conf_data = load_confs(_configs_from_dir(config_dir))
File "/home/hue/hue/desktop/core/src/desktop/lib/conf.py", line 530, in load_confs
for in_conf in conf_source:
File "/home/hue/hue/desktop/core/src/desktop/lib/conf.py", line 511, in _configs_from_dir
conf = ConfigObj(os.path.join(conf_dir, filename))
File "/home/hue/hue/build/env/lib/python2.7/site-packages/configobj-5.0.6-py2.7.egg/configobj.py", line 1229, in __init__
self._load(infile, configspec)
File "/home/hue/hue/build/env/lib/python2.7/site-packages/configobj-5.0.6-py2.7.egg/configobj.py", line 1318, in _load
raise error
configobj.ConfigObjError: Parsing failed with several errors.
First error at line 1046.
In case anyone else runs into this. So the issue stemmed from modifying the hue.ini file before running the install. Rolling back to the original hue.ini resolved the issue. I must have had a typo in the modified version, thus causing the parse error above.
Tarball File location:
hue/desktop/conf/hue.ini
I use KoboToolbox and run KOBOCAT but it give the following Errors when I run manage.py.It works perfect on the port but it shows A server error occurred. Please contact the administrator. And it shows that it cannot import ProcessTimeout.
Here is the the Error log:
Traceback (most recent call last):
File "manage.py", line 21, in
execute_from_command_line(sys.argv)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/management/base.py", line 82, in run_from_argv
return super(CeleryCommand, self).run_from_argv(argv)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.dict)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/management/base.py", line 75, in execute
super(CeleryCommand, self).execute(*args, **options)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/management/commands/celeryd.py", line 25, in handle
worker.run(**options)
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), **kwargs
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/celery/worker/init.py", line 95, in init
self.app.loader.init_worker()
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/celery/loaders/base.py", line 128, in init_worker
self.import_default_modules()
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/loaders.py", line 141, in import_default_modules
self.autodiscover()
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/loaders.py", line 144, in autodiscover
self.task_modules.update(mod.name for mod in autodiscover() or ())
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/loaders.py", line 179, in autodiscover
for app in settings.INSTALLED_APPS])
File "/home/sakib/.virtualenvs/kc/local/lib/python2.7/site-packages/djcelery/loaders.py", line 203, in find_related_module
return importlib.import_module('{0}.{1}'.format(app, related_name))
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/sakib/d2WebApp/kobocat/onadata/apps/viewer/tasks.py", line 14, in
from onadata.libs.utils.logger_tools import mongo_sync_status, report_exception
File "/home/sakib/d2WebApp/kobocat/onadata/libs/utils/logger_tools.py", line 28, in
from modilabs.utils.subprocess_timeout import ProcessTimedOut
ImportError: No module named modilabs.utils.subprocess_timeout
I am seeing a very weired error while debugging my code in PyCharm. The offending lines that cause the exception are
a = db.links.list_indexes()
or the following:
db.links.create_index("created", expireAfterSeconds=settings.EXPIRY_PERIOD, background=True)
My code runs normally inside PyCharm if I simply do run tests, while trying to debug it causes the following error:
======================================================================
ERROR: test_detail_view (sharescreening.tests.TestIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
File "sharescreening/tests.py", line 53, in test_detail_view
response = self.client.get('/')
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/test/client.py", line 500, in get
**extra)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/test/client.py", line 303, in get
return self.generic('GET', path, secure=secure, **r)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/test/client.py", line 379, in generic
return self.request(**r)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/test/client.py", line 466, in request
six.reraise(*exc_info)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 119, in get_response
resolver_match = resolver.resolve(request.path_info)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in resolve
for pattern in self.url_patterns:
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 401, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 395, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
result = _import(*args, **kwargs)
File "sharescreening/urls.py", line 17, in <module>
from .views import put_links, index, get_shares, ShowDetails
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
result = _import(*args, **kwargs)
File "sharescreening/views.py", line 22, in <module>
a = db.links.list_indexes()
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/pymongo/collection.py", line 1269, in list_indexes
with self._socket_for_primary_reads() as (sock_info, slave_ok):
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 699, in _socket_for_reads
with self._get_socket(read_preference) as sock_info:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 663, in _get_socket
server = self._get_topology().select_server(selector)
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/pymongo/topology.py", line 121, in select_server
address))
File "/home/oznt/.virtualenvs/screenshares/local/lib/python2.7/site-packages/pymongo/topology.py", line 97, in select_servers
self._error_message(selector))
ServerSelectionTimeoutError: No servers found yet
----------------------------------------------------------------------
Ran 4 tests in 32.173s
FAILED (errors=1)
I have no clue why the tests pass in the command line, and in simple running mode but not in debug mode. Can someone shed some light on this problem here?
It turns out that the issue was really a problem with the combination or using gevent with the debugger.
If you this problem, it is resolved by upgrading your pycharm version to 2006.1.
More details can be found in the issue in PYCharm tracker
I encounter, at all times, when i try to bind, scss and widgy, the same error.
With any django version, since 1.6.8 to 1.7.3,the last release, and django_pyscss any version, and finally django-widgy to 0.3.3 or other, always the same issue.
There my stack trace on PyDev :
Traceback (most recent call last):
File "C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\workspace\MezzaTest2\manage.py", line 32, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\olive\Environnements\lib\site-packages\django\core\management\__init__.py", line 385, in execute_from_command_line
utility.execute()
File "C:\Users\olive\Environnements\lib\site-packages\django\core\management\__init__.py", line 354, in execute
django.setup()
File "C:\Users\olive\Environnements\lib\site-packages\django\__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\olive\Environnements\lib\site-packages\django\apps\registry.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Users\olive\Environnements\lib\site-packages\django\apps\config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "C:\Python27\Lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Users\olive\Environnements\lib\site-packages\widgy\contrib\page_builder\models.py", line 16, in <module>
from widgy.contrib.page_builder.db.fields import MarkdownField, VideoField, ImageField
File "C:\Users\olive\Environnements\lib\site-packages\widgy\contrib\page_builder\db\fields.py", line 13, in <module>
from widgy.contrib.page_builder.forms import MarkdownField as MarkdownFormField, MarkdownWidget
File "C:\Users\olive\Environnements\lib\site-packages\widgy\contrib\page_builder\forms\__init__.py", line 42, in <module>
class CKEditorWidget(forms.Textarea):
File "C:\Users\olive\Environnements\lib\site-packages\widgy\contrib\page_builder\forms\__init__.py", line 80, in CKEditorWidget
'contentsCss': scss_compile('/widgy/page_builder/html.scss'),
File "C:\Users\olive\Environnements\lib\site-packages\widgy\contrib\page_builder\forms\__init__.py", line 22, in scss_compile
css_content = scss.compile(scss_file=scss_filename)
File "C:\Users\olive\Environnements\lib\site-packages\pyscss-1.3.0.a1-py2.7.egg\scss\legacy.py", line 163, in compile
is_sass=is_sass,
File "C:\Users\olive\Environnements\lib\site-packages\pyscss-1.3.0.a1-py2.7.egg\scss\source.py", line 100, in from_filename
with open(fn, 'rb') as f:
IOError: [Errno 2] No such file or directory: '/widgy/page_builder/html.scss'
It seems that you are running the 1.3.0a1 version of PyScss. Widgy depends on django-pyscss, which currently only supports the 1.2.1 version of PyScss currently. I know that you tried a lot of different versions, but did you try to install PyScss==1.2.1?