after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def inner(func):
@functools.wraps(func)
def ignore_wrapper(*args, **kwargs):
# We need this to keep trace a local variable
t = tracer
if not t:
t = get_tracer()
if not t:
raise NameError("ignore_function only works with global tracer")
t.pa... | def inner(func):
@functools.wraps(func)
def ignore_wrapper(*args, **kwargs):
tracer.pause()
ret = func(*args, **kwargs)
tracer.resume()
return ret
return ignore_wrapper
| https://github.com/gaogaotiantian/viztracer/issues/42 | Traceback (most recent call last):
File "C:/Users/PycharmProjects/oneway_test/test.py", line 12, in <module>
f()
File "D:\virtual\Envs\venv37\lib\site-packages\viztracer\decorator.py", line 17, in ignore_wrapper
tracer.pause()
AttributeError: 'NoneType' object has no attribute 'pause' | AttributeError |
def ignore_wrapper(*args, **kwargs):
# We need this to keep trace a local variable
t = tracer
if not t:
t = get_tracer()
if not t:
raise NameError("ignore_function only works with global tracer")
t.pause()
ret = func(*args, **kwargs)
t.resume()
return ret
| def ignore_wrapper(*args, **kwargs):
tracer.pause()
ret = func(*args, **kwargs)
tracer.resume()
return ret
| https://github.com/gaogaotiantian/viztracer/issues/42 | Traceback (most recent call last):
File "C:/Users/PycharmProjects/oneway_test/test.py", line 12, in <module>
f()
File "D:\virtual\Envs\venv37\lib\site-packages\viztracer\decorator.py", line 17, in ignore_wrapper
tracer.pause()
AttributeError: 'NoneType' object has no attribute 'pause' | AttributeError |
def run_code(self, code, global_dict):
options = self.options
verbose = self.verbose
ofile = self.ofile
tracer = VizTracer(
tracer_entries=options.tracer_entries,
verbose=verbose,
output_file=ofile,
max_stack_depth=options.max_stack_depth,
exclude_files=options.e... | def run_code(self, code, global_dict):
options = self.options
verbose = self.verbose
ofile = self.ofile
tracer = VizTracer(
tracer_entries=options.tracer_entries,
verbose=verbose,
output_file=ofile,
max_stack_depth=options.max_stack_depth,
exclude_files=options.e... | https://github.com/gaogaotiantian/viztracer/issues/42 | Traceback (most recent call last):
File "C:/Users/PycharmProjects/oneway_test/test.py", line 12, in <module>
f()
File "D:\virtual\Envs\venv37\lib\site-packages\viztracer\decorator.py", line 17, in ignore_wrapper
tracer.pause()
AttributeError: 'NoneType' object has no attribute 'pause' | AttributeError |
def __init__(
self,
tracer_entries=1000000,
verbose=1,
max_stack_depth=-1,
include_files=None,
exclude_files=None,
ignore_c_function=False,
ignore_non_file=False,
log_return_value=False,
log_function_args=False,
log_print=False,
log_gc=False,
novdb=False,
pid_suff... | def __init__(
self,
tracer_entries=1000000,
verbose=1,
max_stack_depth=-1,
include_files=None,
exclude_files=None,
ignore_c_function=False,
ignore_non_file=False,
log_return_value=False,
log_function_args=False,
log_print=False,
log_gc=False,
novdb=False,
pid_suff... | https://github.com/gaogaotiantian/viztracer/issues/42 | Traceback (most recent call last):
File "C:/Users/PycharmProjects/oneway_test/test.py", line 12, in <module>
f()
File "D:\virtual\Envs\venv37\lib\site-packages\viztracer\decorator.py", line 17, in ignore_wrapper
tracer.pause()
AttributeError: 'NoneType' object has no attribute 'pause' | AttributeError |
def post_delete_linked(sender, instance, **kwargs):
# When removing project, the linked component might be already deleted now
try:
if instance.linked_component:
instance.linked_component.update_link_alerts(noupdate=True)
except Component.DoesNotExist:
pass
| def post_delete_linked(sender, instance, **kwargs):
# When removing project, the linked component might be already deleted now
try:
if instance.linked_component:
instance.linked_component.update_alerts()
except Component.DoesNotExist:
pass
| https://github.com/WeblateOrg/weblate/issues/4415 | weblate_1 | celery-main stderr | [2020-08-29 04:26:52,377: INFO/MainProcess] Received task: weblate.trans.tasks.component_removal[96b2ff92-8ef2-4da5-90be-0dc156759223]
weblate_1 | celery-main stderr | ERROR Failure while executing task: OperationalError: deadlock detected
weblate_1 | celery-main stderr | DETAIL: ... | OperationalError |
def add_alert(self, alert, noupdate: bool = False, **details):
obj, created = self.alert_set.get_or_create(
name=alert, defaults={"details": details}
)
# Automatically lock on error
if created and self.auto_lock_error and alert in LOCKING_ALERTS:
self.do_lock(user=None, lock=True)
... | def add_alert(self, alert, **details):
obj, created = self.alert_set.get_or_create(
name=alert, defaults={"details": details}
)
# Automatically lock on error
if created and self.auto_lock_error and alert in LOCKING_ALERTS:
self.do_lock(user=None, lock=True)
if not created:
... | https://github.com/WeblateOrg/weblate/issues/4415 | weblate_1 | celery-main stderr | [2020-08-29 04:26:52,377: INFO/MainProcess] Received task: weblate.trans.tasks.component_removal[96b2ff92-8ef2-4da5-90be-0dc156759223]
weblate_1 | celery-main stderr | ERROR Failure while executing task: OperationalError: deadlock detected
weblate_1 | celery-main stderr | DETAIL: ... | OperationalError |
def update_alerts(self):
if (
self.project.access_control == self.project.ACCESS_PUBLIC
and not self.license
and not getattr(settings, "LOGIN_REQUIRED_URLS", None)
):
self.add_alert("MissingLicense")
else:
self.delete_alert("MissingLicense")
# Pick random transla... | def update_alerts(self):
if (
self.project.access_control == self.project.ACCESS_PUBLIC
and not self.license
and not getattr(settings, "LOGIN_REQUIRED_URLS", None)
):
self.add_alert("MissingLicense")
else:
self.delete_alert("MissingLicense")
# Pick random transla... | https://github.com/WeblateOrg/weblate/issues/4415 | weblate_1 | celery-main stderr | [2020-08-29 04:26:52,377: INFO/MainProcess] Received task: weblate.trans.tasks.component_removal[96b2ff92-8ef2-4da5-90be-0dc156759223]
weblate_1 | celery-main stderr | ERROR Failure while executing task: OperationalError: deadlock detected
weblate_1 | celery-main stderr | DETAIL: ... | OperationalError |
def create_index(apps, schema_editor):
if schema_editor.connection.vendor != "postgresql":
return
schema_editor.execute("DROP INDEX memory_source_fulltext")
schema_editor.execute(
"CREATE INDEX memory_source_trgm ON memory_memory USING GIN (source gin_trgm_ops)"
)
| def create_index(apps, schema_editor):
if schema_editor.connection.vendor != "postgresql":
return
# This ensures that extensions are loaded into the session. Without that
# the next ALTER database fails unless we're running as superuser (which
# is allowed to set non existing parameters, so miss... | https://github.com/WeblateOrg/weblate/issues/3940 | Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
Running migrations:
WARNING Handled exception: ProgrammingError: must be owner of database postgres
Appl... | django.db.utils.ProgrammingError |
def update_index(apps, schema_editor):
if schema_editor.connection.vendor != "postgresql":
return
# This ensures that extensions are loaded into the session. Without that
# the next ALTER database fails unless we're running as superuser (which
# is allowed to set non existing parameters, so miss... | def update_index(apps, schema_editor):
if schema_editor.connection.vendor != "postgresql":
return
# This ensures that extensions are loaded into the session. Without that
# the next ALTER database fails unless we're running as superuser (which
# is allowed to set non existing parameters, so miss... | https://github.com/WeblateOrg/weblate/issues/3940 | Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
Running migrations:
WARNING Handled exception: ProgrammingError: must be owner of database postgres
Appl... | django.db.utils.ProgrammingError |
def load_data(self):
result = super().load_data()
for key, vcs in list(result.items()):
try:
version = vcs.get_version()
except Exception as error:
supported = False
self.errors[vcs.name] = str(error)
else:
supported = vcs.is_supported()
... | def load_data(self):
result = super().load_data()
for key, vcs in list(result.items()):
try:
supported = vcs.is_supported()
except Exception as error:
supported = False
self.errors[vcs.name] = str(error)
if not supported:
result.pop(key)
... | https://github.com/WeblateOrg/weblate/issues/4039 | $ weblate list_versions
WARNING Handled exception: FileNotFoundError: [Errno 2] No such file or directory: 'hg'
Traceback (most recent call last):
File "/home/weblate/weblate-env/bin/weblate", line 8, in <module>
sys.exit(main())
File "/home/weblate/weblate-env/lib/python3.8/site-packages/weblate/runner.py", line 32, i... | FileNotFoundError |
def build_unit(self, unit):
output = super().build_unit(unit)
try:
converted_source = xliff_string_to_rich(unit.get_source_plurals())
converted_target = xliff_string_to_rich(unit.get_target_plurals())
except (XMLSyntaxError, TypeError):
return output
output.rich_source = converte... | def build_unit(self, unit):
output = super().build_unit(unit)
try:
converted_source = xliff_string_to_rich(unit.get_source_plurals())
converted_target = xliff_string_to_rich(unit.get_target_plurals())
except XMLSyntaxError:
return output
output.rich_source = converted_source
... | https://github.com/WeblateOrg/weblate/issues/3897 | Traceback (most recent call last):
File "/var/lib/weblate/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/var/lib/weblate/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_m... | TypeError |
def build_unit(self, unit):
try:
converted_source = xliff_string_to_rich(unit.get_source_plurals())
converted_target = xliff_string_to_rich(unit.get_target_plurals())
except XMLSyntaxError:
return super().build_unit(unit)
output = self.storage.UnitClass("")
output.rich_source = c... | def build_unit(self, unit):
try:
converted_source = xliff_string_to_rich(unit.source)
converted_target = xliff_string_to_rich(unit.target)
except XMLSyntaxError:
return super().build_unit(unit)
output = self.storage.UnitClass("")
output.rich_source = converted_source
output.s... | https://github.com/WeblateOrg/weblate/issues/3897 | Traceback (most recent call last):
File "/var/lib/weblate/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/var/lib/weblate/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_m... | TypeError |
def get_last_remote_commit(self):
"""Return latest locally known remote commit."""
try:
revision = self.repository.last_remote_revision
except RepositoryException as error:
report_error(error, prefix="Could not get remote revision")
return None
return self.repository.get_revision... | def get_last_remote_commit(self):
"""Return latest locally known remote commit."""
return self.repository.get_revision_info(self.repository.last_remote_revision)
| https://github.com/WeblateOrg/weblate/issues/3443 | celery-main stderr | [2020-02-03 09:01:29,989: INFO/MainProcess] Received task: weblate.utils.tasks.heartbeat[c1c419aa-da0a-4a6d-ae33-f93d3251244c]
uwsgi stderr | ERROR Internal Server Error: /projects/<some_project>/<some_compnent>/
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django... | weblate.vcs.base.RepositoryException |
def repo_needs_merge(self):
"""Check for unmerged commits from remote repository."""
try:
return self.repository.needs_merge()
except RepositoryException as error:
report_error(cause="Could check merge needed")
self.add_alert("MergeFailure", error=self.error_text(error))
retu... | def repo_needs_merge(self):
"""Check for unmerged commits from remote repository."""
return self.repository.needs_merge()
| https://github.com/WeblateOrg/weblate/issues/3443 | celery-main stderr | [2020-02-03 09:01:29,989: INFO/MainProcess] Received task: weblate.utils.tasks.heartbeat[c1c419aa-da0a-4a6d-ae33-f93d3251244c]
uwsgi stderr | ERROR Internal Server Error: /projects/<some_project>/<some_compnent>/
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django... | weblate.vcs.base.RepositoryException |
def get_queue_length(queue="celery"):
with app.connection_or_acquire() as conn:
return conn.default_channel.queue_declare(
queue=queue, durable=True, auto_delete=False
).message_count
| def get_queue_length(queue="celery"):
with celery_app.connection_or_acquire() as conn:
return conn.default_channel.queue_declare(
queue=queue, durable=True, auto_delete=False
).message_count
| https://github.com/WeblateOrg/weblate/issues/3489 | [ 1221s] ======================================================================
[ 1221s] ERROR: test_digest (weblate.accounts.tests.test_notifications.NotificationTest)
[ 1221s] ----------------------------------------------------------------------
[ 1221s] Traceback (most recent call last):
[ 1221s] File "/home/abui... | FileNotFoundError |
def clean_repo_link(self):
"""Validate repository link."""
try:
repo = Component.objects.get_linked(self.repo)
if repo is not None and repo.is_repo_link:
raise ValidationError(
{
"repo": _(
"Invalid link to a Weblate project... | def clean_repo_link(self):
"""Validate repository link."""
try:
repo = Component.objects.get_linked(self.repo)
if repo is not None and repo.is_repo_link:
raise ValidationError(
{
"repo": _(
"Invalid link to a Weblate project... | https://github.com/WeblateOrg/weblate/issues/3473 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/forms/models.py", line 404, in _post_clean
self.instance.full_clean(exclude=exclude, validate_unique=False)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 1222, in full_clean
raise ValidationError(errors... | ValidationError |
def clean_repo_link(self):
"""Validate repository link."""
try:
repo = Component.objects.get_linked(self.repo)
if repo is not None and repo.is_repo_link:
raise ValidationError(
{
"repo": _(
"Invalid link to a Weblate project... | def clean_repo_link(self):
"""Validate repository link."""
try:
repo = Component.objects.get_linked(self.repo)
if repo is not None and repo.is_repo_link:
raise ValidationError(
{
"repo": _(
"Invalid link to a Weblate project... | https://github.com/WeblateOrg/weblate/issues/3473 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/forms/models.py", line 404, in _post_clean
self.instance.full_clean(exclude=exclude, validate_unique=False)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 1222, in full_clean
raise ValidationError(errors... | ValidationError |
def migrate_unitdata(apps, schema_editor):
db_alias = schema_editor.connection.alias
Unit = apps.get_model("trans", "Unit")
for model in (apps.get_model(*args) for args in MODELS):
# Create new objects for each related unit
for obj in model.objects.using(db_alias).filter(unit=None).iterato... | def migrate_unitdata(apps, schema_editor):
db_alias = schema_editor.connection.alias
Unit = apps.get_model("trans", "Unit")
for model in (apps.get_model(*args) for args in MODELS):
# Create new objects for each related unit
for obj in model.objects.using(db_alias).filter(unit=None).iterato... | https://github.com/WeblateOrg/weblate/issues/3342 | Applying trans.0053_unitdata...Traceback (most recent call last):
File "/home/ubuntu/weblateenv/bin/weblate", line 11, in <module>
sys.exit(main())
File "/home/ubuntu/weblateenv/local/lib/python2.7/site-packages/weblate/runner.py", line 34, in main
execute_from_command_line(argv)
File "/home/ubuntu/weblateenv/local/lib... | AttributeError |
def migrate_unitdata(apps, schema_editor):
db_alias = schema_editor.connection.alias
Unit = apps.get_model("trans", "Unit")
for model_args, fields in MODELS:
model = apps.get_model(*model_args)
# Create new objects for each related unit
for obj in model.objects.using(db_alias).filt... | def migrate_unitdata(apps, schema_editor):
db_alias = schema_editor.connection.alias
Unit = apps.get_model("trans", "Unit")
for model in (apps.get_model(*args) for args in MODELS):
# Create new objects for each related unit
for obj in model.objects.using(db_alias).filter(unit=None).iterato... | https://github.com/WeblateOrg/weblate/issues/3342 | Applying trans.0053_unitdata...Traceback (most recent call last):
File "/home/ubuntu/weblateenv/bin/weblate", line 11, in <module>
sys.exit(main())
File "/home/ubuntu/weblateenv/local/lib/python2.7/site-packages/weblate/runner.py", line 34, in main
execute_from_command_line(argv)
File "/home/ubuntu/weblateenv/local/lib... | AttributeError |
def discover(self):
"""Manual discovery."""
# Accounts
self.register(User, WeblateUserAdmin)
self.register(Role, RoleAdmin)
self.register(Group, WeblateGroupAdmin)
self.register(AuditLog, AuditLogAdmin)
self.register(AutoGroup, AutoGroupAdmin)
self.register(Profile, ProfileAdmin)
sel... | def discover(self):
"""Manual discovery."""
# Accounts
self.register(User, WeblateUserAdmin)
self.register(Role, RoleAdmin)
self.register(Group, WeblateGroupAdmin)
self.register(AuditLog, AuditLogAdmin)
self.register(AutoGroup, AutoGroupAdmin)
self.register(Profile, ProfileAdmin)
sel... | https://github.com/WeblateOrg/weblate/issues/3157 | uwsgi stderr \| ERROR Internal Server Error: /translate/products-template-based/bo-test-template-based/de/
--
| Traceback (most recent call last):
| File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 34, in inner
| response = get_response(request)
| File "/usr/local/lib/python3.7/dist... | IndexError |
def create_profiles(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
User = apps.get_model("weblate_auth", "User")
db_alias = schema_editor.connection.alias
for user in User.objects.using(db_alias).iterator():
Profile.objects.using(db_alias).get_or_create(user=user)
| def create_profiles(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
User = apps.get_model("weblate_auth", "User")
for user in User.objects.iterator():
Profile.objects.get_or_create(user=user)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_subscriptions(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
db_alias = schema_editor.connection.alias
profiles = Profile.objects.using(db_alias).all().select_related("user")
profiles = profiles.exclude(user__username=settings.ANONYMOUS_USER_NAME)
for profile in pr... | def migrate_subscriptions(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
profiles = Profile.objects.all().select_related("user")
profiles = profiles.exclude(user__username=settings.ANONYMOUS_USER_NAME)
for profile in profiles:
user = profile.user
create_default_not... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_editor(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
db_alias = schema_editor.connection.alias
for profile in Profile.objects.using(db_alias).exclude(editor_link=""):
profile.editor_link = weblate.utils.render.migrate_repoweb(profile.editor_link)
profile.s... | def migrate_editor(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
for profile in Profile.objects.exclude(editor_link=""):
profile.editor_link = weblate.utils.render.migrate_repoweb(profile.editor_link)
profile.save()
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_dashboard(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
db_alias = schema_editor.connection.alias
Profile.objects.using(db_alias).filter(dashboard_view=2).update(dashboard_view=1)
| def migrate_dashboard(apps, schema_editor):
Profile = apps.get_model("accounts", "Profile")
Profile.objects.filter(dashboard_view=2).update(dashboard_view=1)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def update_squash_addon(apps, schema_editor):
"""Update events setup for weblate.git.squash addon."""
Addon = apps.get_model("addons", "Addon")
Event = apps.get_model("addons", "Event")
db_alias = schema_editor.connection.alias
for addon in Addon.objects.using(db_alias).filter(name="weblate.git.squa... | def update_squash_addon(apps, schema_editor):
"""Update events setup for weblate.git.squash addon."""
Addon = apps.get_model("addons", "Addon")
Event = apps.get_model("addons", "Event")
for addon in Addon.objects.filter(name="weblate.git.squash"):
Event.objects.get_or_create(addon=addon, event=E... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def update_repo_scope(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
db_alias = schema_editor.connection.alias
Addon.objects.using(db_alias).filter(name="weblate.git.squash").update(
repo_scope=True
)
| def update_repo_scope(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
Addon.objects.filter(name="weblate.git.squash").update(repo_scope=True)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def fix_repo_scope(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
db_alias = schema_editor.connection.alias
Addon.objects.using(db_alias).filter(name="weblate.git.squash").update(
repo_scope=True
)
| def fix_repo_scope(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
Addon.objects.filter(name="weblate.git.squash").update(repo_scope=True)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_flags(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
db_alias = schema_editor.connection.alias
Addon.objects.using(db_alias).filter(
name__in=("weblate.discovery.discovery", "weblate.git.squash")
).update(repo_scope=True)
Add... | def migrate_flags(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
Addon.objects.filter(
name__in=("weblate.discovery.discovery", "weblate.git.squash")
).update(repo_scope=True)
Addon.objects.filter(
name__in=("weblate.removal.comments... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def update_addon(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
Event = apps.get_model("addons", "Event")
db_alias = schema_editor.connection.alias
for addon in Addon.objects.using(db_alias).filter(
name="weblate.consistency.languages"
)... | def update_addon(apps, schema_editor):
"""Update the repo_scope flag."""
Addon = apps.get_model("addons", "Addon")
Event = apps.get_model("addons", "Event")
for addon in Addon.objects.filter(name="weblate.consistency.languages"):
Event.objects.get_or_create(addon=addon, event=EVENT_DAILY)
... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def resolve_auto_format(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
db_alias = schema_editor.connection.alias
for addon in Addon.objects.using(db_alias).filter(
name="weblate.discovery.discovery"
):
if addon.configuration["file_format"] == "auto":
detect =... | def resolve_auto_format(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
for addon in Addon.objects.filter(name="weblate.discovery.discovery"):
if addon.configuration["file_format"] == "auto":
detect = detect_filename(addon.configuration["match"].replace("\\.", "."))
... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def update_resx_addon(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
db_alias = schema_editor.connection.alias
Addon.objects.using(db_alias).filter(
component__file_format="resx", name="weblate.cleanup.generic"
).update(name="weblate.resx.update")
| def update_resx_addon(apps, schema_editor):
Addon = apps.get_model("addons", "Addon")
Addon.objects.filter(
component__file_format="resx", name="weblate.cleanup.generic"
).update(name="weblate.resx.update")
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def set_export_url(apps, schema_editor):
Component = apps.get_model("trans", "Component")
db_alias = schema_editor.connection.alias
matching = (
Component.objects.using(db_alias)
.filter(vcs__in=SUPPORTED_VCS)
.exclude(repo__startswith="weblate:/")
)
for component in matching... | def set_export_url(apps, schema_editor):
Component = apps.get_model("trans", "Component")
matching = Component.objects.filter(vcs__in=SUPPORTED_VCS).exclude(
repo__startswith="weblate:/"
)
for component in matching:
new_url = get_export_url(component)
if component.git_export != n... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def update_linked(apps, schema_editor):
"""Clean branch for linked components."""
Component = apps.get_model("trans", "Component")
db_alias = schema_editor.connection.alias
linked = Component.objects.using(db_alias).filter(repo__startswith="weblate:")
linked.update(branch="")
| def update_linked(apps, schema_editor):
"""Clean branch for linked components."""
Component = apps.get_model("trans", "Component")
linked = Component.objects.filter(repo__startswith="weblate:")
linked.update(branch="")
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def fix_alert_occurence(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
db_alias = schema_editor.connection.alias
Alert.objects.using(db_alias).filter(details__contains='"occurences"').update(
details=Func(
F("details"),
Value('"occurences"'),
Value... | def fix_alert_occurence(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
Alert.objects.filter(details__contains='"occurences"').update(
details=Func(
F("details"),
Value('"occurences"'),
Value('"occurrences"'),
function="replace",
)
... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def unfix_alert_occurence(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
db_alias = schema_editor.connection.alias
Alert.objects.using(db_alias).filter(details__contains='"occurrences"').update(
details=Func(
F("details"),
Value('"occurrences"'),
V... | def unfix_alert_occurence(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
Alert.objects.filter(details__contains='"occurrences"').update(
details=Func(
F("details"),
Value('"occurrences"'),
Value('"occurences"'),
function="replace",
... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def remove_unusednewbase_alert(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
db_alias = schema_editor.connection.alias
Alert.objects.using(db_alias).filter(name="UnusedNewBase").delete()
| def remove_unusednewbase_alert(apps, schema_editor):
Alert = apps.get_model("trans", "Alert")
Alert.objects.filter(name="UnusedNewBase").delete()
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def resolve_auto_format(apps, schema_editor):
Component = apps.get_model("trans", "Component")
db_alias = schema_editor.connection.alias
for component in Component.objects.using(db_alias).filter(file_format="auto"):
path = get_path(component)
template = None
if component.template:
... | def resolve_auto_format(apps, schema_editor):
Component = apps.get_model("trans", "Component")
for component in Component.objects.filter(file_format="auto"):
path = get_path(component)
template = None
if component.template:
template = AutodetectFormat.parse(os.path.join(path,... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_repoweb(apps, schema_editor):
Component = apps.get_model("trans", "Component")
db_alias = schema_editor.connection.alias
for component in Component.objects.using(db_alias).exclude(repoweb=""):
component.repoweb = weblate.utils.render.migrate_repoweb(component.repoweb)
component.s... | def migrate_repoweb(apps, schema_editor):
Component = apps.get_model("trans", "Component")
for component in Component.objects.exclude(repoweb=""):
component.repoweb = weblate.utils.render.migrate_repoweb(component.repoweb)
component.save()
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_alert_change(apps, schema_editor):
Change = apps.get_model("trans", "Change")
db_alias = schema_editor.connection.alias
for change in Change.objects.using(db_alias).filter(action=47).exclude(target=""):
change.details = {"alert": change.target}
change.target = ""
change.s... | def migrate_alert_change(apps, schema_editor):
Change = apps.get_model("trans", "Change")
for change in Change.objects.filter(action=47).exclude(target=""):
change.details = {"alert": change.target}
change.target = ""
change.save()
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_votes(apps, schema_editor):
if not table_has_row(schema_editor.connection, "trans_vote", "positive"):
return
Vote = apps.get_model("trans", "Vote")
db_alias = schema_editor.connection.alias
Vote.objects.using(db_alias).filter(positive=True).update(value=1)
Vote.objects.using(db_a... | def migrate_votes(apps, schema_editor):
if not table_has_row(schema_editor.connection, "trans_vote", "positive"):
return
Vote = apps.get_model("trans", "Vote")
Vote.objects.filter(positive=True).update(value=1)
Vote.objects.filter(positive=False).update(value=-1)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_priority(apps, schema_editor):
Source = apps.get_model("trans", "Source")
db_alias = schema_editor.connection.alias
for source in Source.objects.using(db_alias).exclude(priority=100).iterator():
if source.check_flags:
source.check_flags += ", "
source.check_flags += "... | def migrate_priority(apps, schema_editor):
Source = apps.get_model("trans", "Source")
for source in Source.objects.exclude(priority=100).iterator():
if source.check_flags:
source.check_flags += ", "
source.check_flags += "priority:{}".format(200 - source.priority)
source.save... | https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def migrate_tm(apps, schema_editor):
db_alias = schema_editor.connection.alias
apps.get_model("trans", "Project").objects.using(db_alias).all().update(
contribute_shared_tm=F("use_shared_tm")
)
| def migrate_tm(apps, schema_editor):
apps.get_model("trans", "Project").objects.all().update(
contribute_shared_tm=F("use_shared_tm")
)
| https://github.com/WeblateOrg/weblate/issues/3129 | $ ./manage.py migrate --database=postgresql
Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, conten
ttypes, fonts, gitexport, lang, memory, screenshots, sessions, sites, social_dja
ngo, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0001_initial... O... | MySQLdb._exceptions.OperationalError |
def prefetch(self):
return self.select_related(
"project",
"linked_component",
"linked_component__project",
).prefetch_related("alert_set")
| def prefetch(self):
return self.select_related("project")
| https://github.com/WeblateOrg/weblate/issues/2785 | weblate@jb9:~$ ./venv/bin/weblate list_versions
* Weblate 3.6.1
* Python 3.5.3
* Django 2.2.1
* Celery 4.3.0
* celery-batches 0.2
* six 1.12.0
* social-auth-core 3.2.0
* social-auth-app-django 3.1.0
* django-appconf 1.0.3
* translate-toolkit 2.3.1
* translation-finder 1.5
* Whoosh 2.7.4
* defusedxml 0.6.0
* Git 2.11.0
... | TypeError |
def prefetch(self):
return self.select_related(
"component", "component__project", "language"
).prefetch_related("component__alert_set", "language__plural_set")
| def prefetch(self):
return self.select_related("component", "component__project", "language")
| https://github.com/WeblateOrg/weblate/issues/2785 | weblate@jb9:~$ ./venv/bin/weblate list_versions
* Weblate 3.6.1
* Python 3.5.3
* Django 2.2.1
* Celery 4.3.0
* celery-batches 0.2
* six 1.12.0
* social-auth-core 3.2.0
* social-auth-app-django 3.1.0
* django-appconf 1.0.3
* translate-toolkit 2.3.1
* translation-finder 1.5
* Whoosh 2.7.4
* defusedxml 0.6.0
* Git 2.11.0
... | TypeError |
def show_project(request, project):
obj = get_project(request, project)
user = request.user
dict_langs = (
Language.objects.filter(dictionary__project=obj)
.annotate(Count("dictionary"))
.order()
)
last_changes = Change.objects.prefetch().order().filter(project=obj)[:10]
... | def show_project(request, project):
obj = get_project(request, project)
user = request.user
dict_langs = (
Language.objects.filter(dictionary__project=obj)
.annotate(Count("dictionary"))
.order()
)
last_changes = Change.objects.prefetch().order().filter(project=obj)[:10]
... | https://github.com/WeblateOrg/weblate/issues/2785 | weblate@jb9:~$ ./venv/bin/weblate list_versions
* Weblate 3.6.1
* Python 3.5.3
* Django 2.2.1
* Celery 4.3.0
* celery-batches 0.2
* six 1.12.0
* social-auth-core 3.2.0
* social-auth-app-django 3.1.0
* django-appconf 1.0.3
* translate-toolkit 2.3.1
* translation-finder 1.5
* Whoosh 2.7.4
* defusedxml 0.6.0
* Git 2.11.0
... | TypeError |
def show_component(request, project, component):
obj = get_component(request, project, component)
user = request.user
last_changes = Change.objects.prefetch().order().filter(component=obj)[:10]
return render(
request,
"component.html",
{
"allow_index": True,
... | def show_component(request, project, component):
obj = get_component(request, project, component)
user = request.user
last_changes = Change.objects.prefetch().order().filter(component=obj)[:10]
return render(
request,
"component.html",
{
"allow_index": True,
... | https://github.com/WeblateOrg/weblate/issues/2785 | weblate@jb9:~$ ./venv/bin/weblate list_versions
* Weblate 3.6.1
* Python 3.5.3
* Django 2.2.1
* Celery 4.3.0
* celery-batches 0.2
* six 1.12.0
* social-auth-core 3.2.0
* social-auth-app-django 3.1.0
* django-appconf 1.0.3
* translate-toolkit 2.3.1
* translation-finder 1.5
* Whoosh 2.7.4
* defusedxml 0.6.0
* Git 2.11.0
... | TypeError |
def send_mails(mails):
"""Send multiple mails in single connection."""
connection = get_connection()
try:
connection.open()
except Exception as error:
report_error(error, prefix="Failed to send notifications")
connection.close()
return
try:
for mail in mails:... | def send_mails(mails):
"""Send multiple mails in single connection."""
with get_connection() as connection:
for mail in mails:
email = EmailMultiAlternatives(
settings.EMAIL_SUBJECT_PREFIX + mail["subject"],
html2text(mail["body"]),
to=[mail["a... | https://github.com/WeblateOrg/weblate/issues/2721 | 2019-05-01 15:08:46,128 ERROR Internal Server Error: /create/component/
Traceback (most recent call last):
File "/opt/bitnami/apps/weblate/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/opt/bitnami/apps/weblate/venv/lib/python3.7/site-packa... | ConnectionRefusedError |
def report_error(
error, request=None, extra_data=None, level="warning", prefix="Handled exception"
):
"""Wrapper for error reporting
This can be used for store exceptions in error reporting solutions as
rollbar while handling error gracefully and giving user cleaner message.
"""
if HAS_ROLLBAR... | def report_error(error, request=None, extra_data=None, level="warning"):
"""Wrapper for error reporting
This can be used for store exceptions in error reporting solutions as
rollbar while handling error gracefully and giving user cleaner message.
"""
if HAS_ROLLBAR and hasattr(settings, "ROLLBAR"):... | https://github.com/WeblateOrg/weblate/issues/2721 | 2019-05-01 15:08:46,128 ERROR Internal Server Error: /create/component/
Traceback (most recent call last):
File "/opt/bitnami/apps/weblate/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/opt/bitnami/apps/weblate/venv/lib/python3.7/site-packa... | ConnectionRefusedError |
def handle(self, *args, **options):
"""Automatic import of components."""
# Get project
try:
project = Project.objects.get(slug=options["project"])
except Project.DoesNotExist:
raise CommandError("Project does not exist!")
# Get main component
main_component = None
if option... | def handle(self, *args, **options):
"""Automatic import of components."""
# Get project
try:
project = Project.objects.get(slug=options["project"])
except Project.DoesNotExist:
raise CommandError("Project does not exist!")
# Get main component
main_component = None
if option... | https://github.com/WeblateOrg/weblate/issues/2417 | Traceback (most recent call last):
File "/app/.global/bin/weblate", line 11, in <module>
sys.exit(main())
File "/app/.global/lib/python3.7/site-packages/weblate/runner.py", line 34, in main
execute_from_command_line(argv)
File "/app/.global/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in e... | weblate.vcs.base.RepositoryException |
def __init__(self, storefile, template_store=None, language_code=None):
"""Create file format object, wrapping up translate-toolkit's store."""
self.storefile = storefile
# Load store
if isinstance(storefile, TranslationStore):
# Used by XLSX writer
self.store = storefile
else:
... | def __init__(self, storefile, template_store=None, language_code=None):
"""Create file format object, wrapping up translate-toolkit's store."""
self.storefile = storefile
# Load store
if isinstance(storefile, TranslationStore):
# Used by XLSX writer
self.store = storefile
else:
... | https://github.com/WeblateOrg/weblate/issues/2296 | ======================================================================
FAIL: test_import_author (weblate.trans.tests.test_files.StringsImportTest)
Test importing normally.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packag... | AssertionError |
def handle(self, *args, **options):
# Optimize index
if options["optimize"]:
optimize_fulltext()
return
fulltext = Fulltext()
# Optionally rebuild indices from scratch
if options["clean"]:
fulltext.cleanup()
if options["all"]:
self.process_all(fulltext)
else:... | def handle(self, *args, **options):
fulltext = Fulltext()
# Optimize index
if options["optimize"]:
self.optimize_index(fulltext)
return
# Optionally rebuild indices from scratch
if options["clean"]:
fulltext.cleanup()
if options["all"]:
self.process_all(fulltext)... | https://github.com/WeblateOrg/weblate/issues/1056 | Process Process-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/multiprocessing/process.py", line 254, in _bootstrap
self.run()
File "/usr/local/lib/python3.5/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/site-packages/weblate/... | AttributeError |
def set_export_url(apps, schema_editor):
Component = apps.get_model("trans", "Component")
matching = Component.objects.filter(vcs__in=SUPPORTED_VCS).exclude(
repo__startswith="weblate:/"
)
for component in matching:
new_url = get_export_url(component)
if component.git_export != n... | def set_export_url(apps, schema_editor):
SubProject = apps.get_model("trans", "SubProject")
matching = SubProject.objects.filter(vcs__in=SUPPORTED_VCS).exclude(
repo__startswith="weblate:/"
)
for component in matching:
new_url = get_export_url(component)
if component.git_export !... | https://github.com/WeblateOrg/weblate/issues/2065 | /usr/share/weblate# ./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.... | django.db.migrations.exceptions.InconsistentMigrationHistory |
def forwards(apps, schema_editor):
change_foreign_keys(apps, schema_editor, "auth", "User", "weblate_auth", "User")
| def forwards(apps, schema_editor):
change_foreign_keys(apps, schema_editor, "auth", "User", "weblate_auth", "User")
change_foreign_keys(apps, schema_editor, "auth", "Group", "weblate_auth", "Group")
| https://github.com/WeblateOrg/weblate/issues/2050 | Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, lang, memory, permissions, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0007_auto_20180509_0739...Traceback (most recent call last):
File ".... | ValueError |
def backwards(apps, schema_editor):
change_foreign_keys(apps, schema_editor, "weblate_auth", "User", "auth", "User")
| def backwards(apps, schema_editor):
change_foreign_keys(apps, schema_editor, "weblate_auth", "User", "auth", "User")
change_foreign_keys(apps, schema_editor, "weblate_auth", "Group", "auth", "Group")
| https://github.com/WeblateOrg/weblate/issues/2050 | Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, lang, memory, permissions, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0007_auto_20180509_0739...Traceback (most recent call last):
File ".... | ValueError |
def change_foreign_keys(
apps, schema_editor, from_app, from_model_name, to_app, to_model_name
):
FromModel = apps.get_model(from_app, from_model_name)
ToModel = apps.get_model(to_app, to_model_name)
fields = FromModel._meta.get_fields(include_hidden=True)
for rel in fields:
if not hasattr... | def change_foreign_keys(
apps, schema_editor, from_app, from_model_name, to_app, to_model_name
):
from django.db import models
FromModel = apps.get_model(from_app, from_model_name)
ToModel = apps.get_model(to_app, to_model_name)
fields = FromModel._meta.get_fields(include_hidden=True)
for rel... | https://github.com/WeblateOrg/weblate/issues/2050 | Operations to perform:
Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, lang, memory, permissions, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
Running migrations:
Applying weblate_auth.0007_auto_20180509_0739...Traceback (most recent call last):
File ".... | ValueError |
def handle(self, *args, **options):
hours = options["age"]
if hours:
age = timezone.now() - timedelta(hours=hours)
for translation in self.get_translations(**options):
if not translation.repo_needs_commit():
continue
if not hours:
age = timezone.now() - tim... | def handle(self, *args, **options):
hours = options["age"]
if hours:
age = timezone.now() - timedelta(hours=hours)
for translation in self.get_translations(**options):
if not translation.repo_needs_commit():
continue
if not hours:
age = timezone.now() - tim... | https://github.com/WeblateOrg/weblate/issues/1810 | Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/home/www-data/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/www-data/.local/lib/python2.7/site-packages/dj... | django.db.transaction.TransactionManagementError |
def handle(self, *args, **options):
hours = options["age"]
if hours:
age = timezone.now() - timedelta(hours=hours)
for translation in self.get_translations(**options):
if not translation.repo_needs_commit():
continue
if not hours:
age = timezone.now() - tim... | def handle(self, *args, **options):
hours = options["age"]
if hours:
age = timezone.now() - timedelta(hours=hours)
for translation in self.get_translations(**options):
if not translation.repo_needs_commit():
continue
if not hours:
age = timezone.now() - tim... | https://github.com/WeblateOrg/weblate/issues/1810 | Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/home/www-data/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/www-data/.local/lib/python2.7/site-packages/dj... | django.db.transaction.TransactionManagementError |
def merge_upload(
self,
request,
fileobj,
overwrite,
author=None,
merge_header=True,
method="translate",
fuzzy="",
):
"""Top level handler for file uploads."""
filecopy = fileobj.read()
fileobj.close()
# Strip possible UTF-8 BOM
if filecopy[:3] == codecs.BOM_UTF8:
... | def merge_upload(
self,
request,
fileobj,
overwrite,
author=None,
merge_header=True,
method="translate",
fuzzy="",
):
"""Top level handler for file uploads."""
filecopy = fileobj.read()
fileobj.close()
# Strip possible UTF-8 BOM
if filecopy[:3] == codecs.BOM_UTF8:
... | https://github.com/WeblateOrg/weblate/issues/1407 | Traceback (most recent call last):
File "/home/nijel/weblate_hosted/weblate/trans/views/files.py", line 118, in upload_translation
fuzzy=form.cleaned_data['fuzzy'],
File "/home/nijel/weblate_hosted/weblate/trans/models/translation.py", line 1122, in merge_upload
raise Exception('Plural forms do not match the language.'... | Exception |
def add_vote(self, translation, request, positive):
"""
Adds (or updates) vote for a suggestion.
"""
if not request.user.is_authenticated():
return
vote, created = Vote.objects.get_or_create(
suggestion=self, user=request.user, defaults={"positive": positive}
)
if not create... | def add_vote(self, translation, request, positive):
"""
Adds (or updates) vote for a suggestion.
"""
vote, created = Vote.objects.get_or_create(
suggestion=self, user=request.user, defaults={"positive": positive}
)
if not created or vote.positive != positive:
vote.positive = posi... | https://github.com/WeblateOrg/weblate/issues/988 | Internal Server Error: /translate/sites/xxx/it/
Traceback (most recent call last):
File "/app/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/local/lib/python2.7/site-packages/weblate/trans/view... | TypeError |
def post_login_handler(sender, request, user, **kwargs):
"""
Signal handler for setting user language and
migrating profile if needed.
"""
# Warning about setting password
if (
getattr(user, "backend", "").endswith(".EmailAuth")
and not user.has_usable_password()
):
... | def post_login_handler(sender, request, user, **kwargs):
"""
Signal handler for setting user language and
migrating profile if needed.
"""
# Warning about setting password
if (
getattr(user, "backend", "").endswith(".EmailAuth")
and not user.has_usable_password()
):
... | https://github.com/WeblateOrg/weblate/issues/1086 | ERROR Internal Server Error: /accounts/login/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in ... | IntegrityError |
def upload(self, request, project, language, fileobj, method):
"""
Handles dictionary upload.
"""
from weblate.trans.models.changes import Change
store = AutoFormat.parse(fileobj)
ret = 0
# process all units
for dummy, unit in store.iterate_merge(False):
source = unit.get_sour... | def upload(self, request, project, language, fileobj, method):
"""
Handles dictionary upload.
"""
from weblate.trans.models.changes import Change
store = AutoFormat.parse(fileobj)
ret = 0
# process all units
for dummy, unit in store.iterate_merge(False):
source = unit.get_sour... | https://github.com/WeblateOrg/weblate/issues/938 | Operations to perform:
Synchronize unmigrated apps: staticfiles, admindocs, messages, sitemaps, compressor, weblate, crispy_forms
Apply all migrations: lang, sessions, admin, sites, auth, default, contenttypes, accounts, trans
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing ... | django.db.utils.OperationalError |
def get_clean_env(extra=None):
"""
Returns cleaned up environment for subprocess execution.
"""
environ = {"LANG": "en_US.UTF-8"}
if extra is not None:
environ.update(extra)
variables = ("HOME", "PATH", "LD_LIBRARY_PATH")
for var in variables:
if var in os.environ:
... | def get_clean_env(extra=None):
"""
Returns cleaned up environment for subprocess execution.
"""
environ = {}
if extra is not None:
environ.update(extra)
variables = ("HOME", "PATH", "LANG", "LD_LIBRARY_PATH")
for var in variables:
if var in os.environ:
environ[var... | https://github.com/WeblateOrg/weblate/issues/697 | Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/var/www/my.website.com/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/var/www/my.website.com/env/local/lib/py... | AttributeError |
def _get_version(cls):
"""
Returns VCS program version.
"""
output = cls._popen(["version", "-q"])
matches = cls.VERSION_RE.match(output)
if matches is None:
raise OSError("Failed to parse version string: {0}".format(output))
return matches.group(1)
| def _get_version(cls):
"""
Returns VCS program version.
"""
output = cls._popen(["version", "-q"])
return cls.VERSION_RE.match(output).group(1)
| https://github.com/WeblateOrg/weblate/issues/697 | Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/var/www/my.website.com/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/var/www/my.website.com/env/local/lib/py... | AttributeError |
def get_last_remote_commit(self):
"""
Returns latest remote commit we know.
"""
try:
return self.git_repo.commit("origin/%s" % self.branch)
except ODBError:
# Try to reread git database in case our in memory object is not
# up to date with it.
self.reset_git_repo()
... | def get_last_remote_commit(self):
"""
Returns latest remote commit we know.
"""
return self.git_repo.commit("origin/%s" % self.branch)
| https://github.com/WeblateOrg/weblate/issues/449 | Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/paour/weblate/trans/views/basic.py", line 360, in show_translation
kwargs=obj.get_kwargs(),
File "/usr/lib/pyt... | wsgi.error |
def get_last_remote_commit(self):
"""
Returns latest remote commit we know.
"""
try:
return self.git_repo.commit("origin/%s" % self.branch)
except ODBError:
# Try to reread git database in case our in memory object is not
# up to date with it.
self.git_repo.odb.update... | def get_last_remote_commit(self):
"""
Returns latest remote commit we know.
"""
try:
return self.git_repo.commit("origin/%s" % self.branch)
except ODBError:
# Try to reread git database in case our in memory object is not
# up to date with it.
self.reset_git_repo()
... | https://github.com/WeblateOrg/weblate/issues/449 | Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/paour/weblate/trans/views/basic.py", line 360, in show_translation
kwargs=obj.get_kwargs(),
File "/usr/lib/pyt... | wsgi.error |
def mail_admins_contact(subject, message, context, sender):
"""
Sends a message to the admins, as defined by the ADMINS setting.
"""
weblate.logger.info(
"contact from from %s: %s",
email,
subject,
)
if not settings.ADMINS:
return
mail = EmailMultiAlternative... | def mail_admins_contact(subject, message, context, sender):
"""
Sends a message to the admins, as defined by the ADMINS setting.
"""
if not settings.ADMINS:
return
mail = EmailMultiAlternatives(
"%s%s" % (settings.EMAIL_SUBJECT_PREFIX, subject % context),
message % context,
... | https://github.com/WeblateOrg/weblate/issues/449 | Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/paour/weblate/trans/views/basic.py", line 360, in show_translation
kwargs=obj.get_kwargs(),
File "/usr/lib/pyt... | wsgi.error |
def notify_user(self, notification, translation_obj, context=None, headers=None):
"""
Wrapper for sending notifications to user.
"""
if context is None:
context = {}
if headers is None:
headers = {}
# Check whether user is still allowed to access this project
if not translat... | def notify_user(self, notification, translation_obj, context=None, headers=None):
"""
Wrapper for sending notifications to user.
"""
if context is None:
context = {}
if headers is None:
headers = {}
# Check whether user is still allowed to access this project
if not translat... | https://github.com/WeblateOrg/weblate/issues/239 | Traceback (most recent call last):
File "/XXXXXXXX/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/XXXXXXXX/weblate/trans/views.py", line 1370, in translate
subscription.notify_new_suggestion(obj, sug, unit)
File "/XXXXXXXX/weblate/accoun... | AttributeError |
def performance(request):
"""
Shows performance tuning tips.
"""
checks = []
# Check for debug mode
checks.append(
(
_("Debug mode"),
not settings.DEBUG,
"production-debug",
)
)
# Check for domain configuration
checks.append(
... | def performance(request):
"""
Shows performance tuning tips.
"""
checks = []
# Check for debug mode
checks.append(
(
_("Debug mode"),
not settings.DEBUG,
"production-debug",
)
)
# Check for domain configuration
checks.append(
... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def update_subproject(request, project, subproject):
"""
API hook for updating git repos.
"""
if not appsettings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
obj = get_object_or_404(SubProject, slug=subproject, project__slug=project)
thread = threading.Thread(target=obj.do_update)
... | def update_subproject(request, project, subproject):
"""
API hook for updating git repos.
"""
if not settings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
obj = get_object_or_404(SubProject, slug=subproject, project__slug=project)
thread = threading.Thread(target=obj.do_update)
th... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def update_project(request, project):
"""
API hook for updating git repos.
"""
if not appsettings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
obj = get_object_or_404(Project, slug=project)
thread = threading.Thread(target=obj.do_update)
thread.start()
return HttpResponse("upd... | def update_project(request, project):
"""
API hook for updating git repos.
"""
if not settings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
obj = get_object_or_404(Project, slug=project)
thread = threading.Thread(target=obj.do_update)
thread.start()
return HttpResponse("update... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def github_hook(request):
"""
API to handle commit hooks from Github.
"""
if not appsettings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
if request.method != "POST":
return HttpResponseNotAllowed(["POST"])
try:
data = json.loads(request.POST["payload"])
except (Va... | def github_hook(request):
"""
API to handle commit hooks from Github.
"""
if not settings.ENABLE_HOOKS:
return HttpResponseNotAllowed([])
if request.method != "POST":
return HttpResponseNotAllowed(["POST"])
try:
data = json.loads(request.POST["payload"])
except (Value... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def title(request):
return {"site_title": appsettings.SITE_TITLE}
| def title(request):
return {"site_title": settings.SITE_TITLE}
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def mt(request):
return {
"apertium_api_key": appsettings.MT_APERTIUM_KEY,
"microsoft_api_key": appsettings.MT_MICROSOFT_KEY,
}
| def mt(request):
return {
"apertium_api_key": settings.MT_APERTIUM_KEY,
"microsoft_api_key": settings.MT_MICROSOFT_KEY,
}
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def title(self):
return _("Recent changes in %s") % appsettings.SITE_TITLE
| def title(self):
return _("Recent changes in %s") % settings.SITE_TITLE
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def description(self):
return _("All recent changes made using Weblate in %s.") % appsettings.SITE_TITLE
| def description(self):
return _("All recent changes made using Weblate in %s.") % settings.SITE_TITLE
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def add_to_index(self, unit, source=True):
"""
Updates/Adds to all indices given unit.
"""
if appsettings.OFFLOAD_INDEXING:
from weblate.trans.models import IndexUpdate
IndexUpdate.objects.get_or_create(unit=unit, source=source)
return
writer_target = FULLTEXT_INDEX.target_... | def add_to_index(self, unit, source=True):
"""
Updates/Adds to all indices given unit.
"""
if settings.OFFLOAD_INDEXING:
from weblate.trans.models import IndexUpdate
IndexUpdate.objects.get_or_create(unit=unit, source=source)
return
writer_target = FULLTEXT_INDEX.target_wri... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def search(self, query, source=True, context=True, translation=True, checksums=False):
"""
Performs full text search on defined set of fields.
Returns queryset unless checksums is set.
"""
ret = set()
if source or context:
with FULLTEXT_INDEX.source_searcher(
not appsettings... | def search(self, query, source=True, context=True, translation=True, checksums=False):
"""
Performs full text search on defined set of fields.
Returns queryset unless checksums is set.
"""
ret = set()
if source or context:
with FULLTEXT_INDEX.source_searcher(not settings.OFFLOAD_INDEXIN... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def similar(self, unit):
"""
Finds similar units to current unit.
"""
ret = set([unit.checksum])
with FULLTEXT_INDEX.source_searcher(not appsettings.OFFLOAD_INDEXING) as searcher:
# Extract up to 10 terms from the source
terms = [
kw
for kw, score in searcher.... | def similar(self, unit):
"""
Finds similar units to current unit.
"""
ret = set([unit.checksum])
with FULLTEXT_INDEX.source_searcher(not settings.OFFLOAD_INDEXING) as searcher:
# Extract up to 10 terms from the source
terms = [
kw
for kw, score in searcher.key... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def create_source_index():
return create_in(appsettings.WHOOSH_INDEX, schema=SOURCE_SCHEMA, indexname="source")
| def create_source_index():
return create_in(settings.WHOOSH_INDEX, schema=SOURCE_SCHEMA, indexname="source")
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def create_target_index(lang):
return create_in(
appsettings.WHOOSH_INDEX, schema=TARGET_SCHEMA, indexname="target-%s" % lang
)
| def create_target_index(lang):
return create_in(
settings.WHOOSH_INDEX, schema=TARGET_SCHEMA, indexname="target-%s" % lang
)
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def create_index(sender=None, **kwargs):
if not os.path.exists(appsettings.WHOOSH_INDEX):
os.mkdir(appsettings.WHOOSH_INDEX)
create_source_index()
| def create_index(sender=None, **kwargs):
if not os.path.exists(settings.WHOOSH_INDEX):
os.mkdir(settings.WHOOSH_INDEX)
create_source_index()
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def source(self):
"""
Returns source index.
"""
if self._source is None:
try:
self._source = open_dir(appsettings.WHOOSH_INDEX, indexname="source")
except whoosh.index.EmptyIndexError:
self._source = create_source_index()
except IOError:
# eg. ... | def source(self):
"""
Returns source index.
"""
if self._source is None:
try:
self._source = open_dir(settings.WHOOSH_INDEX, indexname="source")
except whoosh.index.EmptyIndexError:
self._source = create_source_index()
except IOError:
# eg. pat... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def target(self, lang):
"""
Returns target index for given language.
"""
if not lang in self._target:
try:
self._target[lang] = open_dir(
appsettings.WHOOSH_INDEX, indexname="target-%s" % lang
)
except whoosh.index.EmptyIndexError:
self... | def target(self, lang):
"""
Returns target index for given language.
"""
if not lang in self._target:
try:
self._target[lang] = open_dir(
settings.WHOOSH_INDEX, indexname="target-%s" % lang
)
except whoosh.index.EmptyIndexError:
self._t... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def site_title(value):
"""
Returns site title
"""
return appsettings.SITE_TITLE
| def site_title(value):
"""
Returns site title
"""
return settings.SITE_TITLE
| https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def js_config(request):
"""
Generates settings for javascript. Includes things like
API keys for translaiton services or list of languages they
support.
"""
# Apertium support
if appsettings.MT_APERTIUM_KEY is not None and appsettings.MT_APERTIUM_KEY != "":
try:
listpairs... | def js_config(request):
"""
Generates settings for javascript. Includes things like
API keys for translaiton services or list of languages they
support.
"""
# Apertium support
if settings.MT_APERTIUM_KEY is not None and settings.MT_APERTIUM_KEY != "":
try:
listpairs = url... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def render(request, project, widget="287x66", color=None, lang=None):
obj = get_object_or_404(Project, slug=project)
# Handle language parameter
if lang is not None:
try:
django.utils.translation.activate(lang)
except:
# Ignore failure on activating language
... | def render(request, project, widget="287x66", color=None, lang=None):
obj = get_object_or_404(Project, slug=project)
# Handle language parameter
if lang is not None:
try:
django.utils.translation.activate(lang)
except:
# Ignore failure on activating language
... | https://github.com/WeblateOrg/weblate/issues/198 | Traceback (most recent call last):
File "/srv/weblate/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/srv/weblate/src/weblate/weblate/trans/views.py", line 1395, in translate
saved = unit.save_backend(requ... | AttributeError |
def store_user_details(sender, user, request, **kwargs):
"""
Stores user details on registration and creates user profile. We rely on
validation done by RegistrationForm.
"""
user.first_name = request.POST["first_name"]
user.last_name = request.POST["last_name"]
user.save()
profile, newp... | def store_user_details(sender, user, request, **kwargs):
"""
Stores user details on registration, here we rely on
validation done by RegistrationForm.
"""
user.first_name = request.POST["first_name"]
user.last_name = request.POST["last_name"]
user.save()
| https://github.com/WeblateOrg/weblate/issues/132 | * Error running /home/victor/weblate-1.3-0/python/bin/python manage.py createadmin : Traceback (most recent call last):
File "manage.py", line 30, in <module>
execute_from_command_line(sys.argv)
File "/home/victor/weblate-1.3-0/apps/django/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in ex... | django.db.transaction.TransactionManagementError |
def get_tokenizer(model_name: str, **kwargs) -> transformers.PreTrainedTokenizer:
from allennlp.common.util import hash_object
cache_key = (model_name, hash_object(kwargs))
global _tokenizer_cache
tokenizer = _tokenizer_cache.get(cache_key, None)
if tokenizer is None:
tokenizer = transform... | def get_tokenizer(model_name: str, **kwargs) -> transformers.PreTrainedTokenizer:
cache_key = (model_name, frozenset(kwargs.items()))
global _tokenizer_cache
tokenizer = _tokenizer_cache.get(cache_key, None)
if tokenizer is None:
tokenizer = transformers.AutoTokenizer.from_pretrained(
... | https://github.com/allenai/allennlp/issues/4690 | 2020-09-30 23:56:17,398 - INFO - allennlp.training.trainer - Epoch 0/9
2020-09-30 23:56:17,398 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 10065.304
2020-09-30 23:56:17,484 - WARNING - allennlp.common.util - unable to check gpu_memory_mb() due to occasional failure, continuing
Traceback (most recent ... | OSError |
def __init__(
self,
model_name: str,
*,
max_length: int = None,
sub_module: str = None,
train_parameters: bool = True,
last_layer_only: bool = True,
override_weights_file: Optional[str] = None,
override_weights_strip_prefix: Optional[str] = None,
gradient_checkpointing: Optional[... | def __init__(
self,
model_name: str,
*,
max_length: int = None,
sub_module: str = None,
train_parameters: bool = True,
last_layer_only: bool = True,
override_weights_file: Optional[str] = None,
override_weights_strip_prefix: Optional[str] = None,
gradient_checkpointing: Optional[... | https://github.com/allenai/allennlp/issues/4690 | 2020-09-30 23:56:17,398 - INFO - allennlp.training.trainer - Epoch 0/9
2020-09-30 23:56:17,398 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 10065.304
2020-09-30 23:56:17,484 - WARNING - allennlp.common.util - unable to check gpu_memory_mb() due to occasional failure, continuing
Traceback (most recent ... | OSError |
def sanitize(x: Any) -> Any:
"""
Sanitize turns PyTorch and Numpy types into basic Python types so they
can be serialized into JSON.
"""
# Import here to avoid circular references
from allennlp.data.tokenizers import Token
if isinstance(x, (str, float, int, bool)):
# x is already se... | def sanitize(x: Any) -> Any:
"""
Sanitize turns PyTorch and Numpy types into basic Python types so they
can be serialized into JSON.
"""
# Import here to avoid circular references
from allennlp.data.tokenizers.token import Token
if isinstance(x, (str, float, int, bool)):
# x is alre... | https://github.com/allenai/allennlp/issues/4819 | Traceback (most recent call last):
File "token.py", line 1, in <module>
from dataclasses import dataclass
File "/opt/anaconda3/envs/allentest/lib/python3.7/dataclasses.py", line 5, in <module>
import inspect
File "/opt/anaconda3/envs/allentest/lib/python3.7/inspect.py", line 40, in <module>
import linecache
File "/opt/... | ImportError |
def _try_train(self) -> Dict[str, Any]:
try:
epoch_counter = self._restore_checkpoint()
except RuntimeError:
traceback.print_exc()
raise ConfigurationError(
"Could not recover training from the checkpoint. Did you mean to output to "
"a different serialization di... | def _try_train(self) -> Dict[str, Any]:
try:
epoch_counter = self._restore_checkpoint()
except RuntimeError:
traceback.print_exc()
raise ConfigurationError(
"Could not recover training from the checkpoint. Did you mean to output to "
"a different serialization di... | https://github.com/allenai/allennlp/issues/4810 | UnboundLocalErrorTraceback (most recent call last)
<ipython-input-9-513339770b41> in <module>
46
47 try:
---> 48 metrics = trainer.train()
49 except KeyboardInterrupt:
50 pass
/opt/.pyenv/versions/3.7.4/lib/python3.7/site-packages/allennlp/training/trainer.py in train(self)
964 """
965 try:
-->... | UnboundLocalError |
def _intra_word_tokenize(
self, string_tokens: List[str]
) -> Tuple[List[Token], List[Optional[Tuple[int, int]]]]:
tokens: List[Token] = []
offsets: List[Optional[Tuple[int, int]]] = []
for token_string in string_tokens:
wordpieces = self.tokenizer.encode_plus(
token_string,
... | def _intra_word_tokenize(
self, string_tokens: List[str]
) -> Tuple[List[Token], List[Optional[Tuple[int, int]]]]:
tokens: List[Token] = []
offsets: List[Optional[Tuple[int, int]]] = []
for token_string in string_tokens:
wordpieces = self.tokenizer.encode_plus(
token_string,
... | https://github.com/allenai/allennlp/issues/4757 | Traceback (most recent call last):
File "bug_example.py", line 4, in <module>
tokenizer_kwargs={"use_fast": False}).intra_word_tokenize(["My", "text", "will"])
File "X/venv/lib/python3.6/site-packages/allennlp-1.2.0rc1-py3.6.egg/allennlp/data/tokenizers/pretrained_transformer_tokenizer.py", line 387, in intra_word_toke... | ValueError |
def add_sentence_boundary_token_ids(
tensor: torch.Tensor,
mask: torch.BoolTensor,
sentence_begin_token: Any,
sentence_end_token: Any,
) -> Tuple[torch.Tensor, torch.BoolTensor]:
"""
Add begin/end of sentence tokens to the batch of sentences.
Given a batch of sentences with size `(batch_size... | def add_sentence_boundary_token_ids(
tensor: torch.Tensor,
mask: torch.BoolTensor,
sentence_begin_token: Any,
sentence_end_token: Any,
) -> Tuple[torch.Tensor, torch.BoolTensor]:
"""
Add begin/end of sentence tokens to the batch of sentences.
Given a batch of sentences with size `(batch_size... | https://github.com/allenai/allennlp/issues/4646 | 2020-09-16 17:06:02,589 - INFO - allennlp.training.trainer - Beginning training.
2020-09-16 17:06:02,589 - INFO - allennlp.training.trainer - Epoch 0/21
2020-09-16 17:06:02,589 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 3118.312
2020-09-16 17:06:02,730 - INFO - allennlp.training.trainer - GPU 0 memo... | RuntimeError |
def import_plugins() -> None:
"""
Imports the plugins found with `discover_plugins()`.
"""
# Workaround for a presumed Python issue where spawned processes can't find modules in the current directory.
cwd = os.getcwd()
if cwd not in sys.path:
sys.path.append(cwd)
for module_name in... | def import_plugins() -> None:
"""
Imports the plugins found with `discover_plugins()`.
"""
for module_name in DEFAULT_PLUGINS:
try:
# For default plugins we recursively import everything.
import_module_and_submodules(module_name)
logger.info("Plugin %s availab... | https://github.com/allenai/allennlp/issues/4428 | Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/xxx/anaconda3/envs/allennlp1.0/lib/python3.7/multiprocessing/spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "/home/xxx/anaconda3/envs/allennlp1.0/lib/python3.7/multiprocessing/spawn.py", line 115, in _main
self = reduction... | ModuleNotFoundError |
def get_metric(
self,
reset: bool = False,
):
"""
# Returns
The accumulated metrics as a dictionary.
"""
unlabeled_attachment_score = 0.0
labeled_attachment_score = 0.0
unlabeled_exact_match = 0.0
labeled_exact_match = 0.0
if self._total_words > 0.0:
unlabeled_attac... | def get_metric(
self,
reset: bool = False,
cuda_device: Union[int, torch.device] = torch.device("cpu"),
):
"""
# Returns
The accumulated metrics as a dictionary.
"""
unlabeled_attachment_score = 0.0
labeled_attachment_score = 0.0
unlabeled_exact_match = 0.0
labeled_exact_mat... | https://github.com/allenai/allennlp/issues/4623 | 0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Beginning training.
0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Epoch 0/9
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 2984.032
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.train... | RuntimeError |
def __call__(self, value):
"""
# Parameters
value : `float`
The value to average.
"""
_total_value = list(self.detach_tensors(value))[0]
_count = 1
if is_distributed():
device = torch.device("cuda" if dist.get_backend() == "nccl" else "cpu")
count = torch.tensor(_cou... | def __call__(self, value):
"""
# Parameters
value : `float`
The value to average.
"""
_total_value = list(self.detach_tensors(value))[0]
_count = 1
if is_distributed():
device = torch.device("cpu")
count = torch.tensor(_count).to(device)
total_value = torch.t... | https://github.com/allenai/allennlp/issues/4623 | 0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Beginning training.
0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Epoch 0/9
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 2984.032
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.train... | RuntimeError |
def __call__(self, predicted_trees: List[Tree], gold_trees: List[Tree]) -> None: # type: ignore
"""
# Parameters
predicted_trees : `List[Tree]`
A list of predicted NLTK Trees to compute score for.
gold_trees : `List[Tree]`
A list of gold NLTK Trees to use as a reference.
"""
if... | def __call__(self, predicted_trees: List[Tree], gold_trees: List[Tree]) -> None: # type: ignore
"""
# Parameters
predicted_trees : `List[Tree]`
A list of predicted NLTK Trees to compute score for.
gold_trees : `List[Tree]`
A list of gold NLTK Trees to use as a reference.
"""
if... | https://github.com/allenai/allennlp/issues/4623 | 0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Beginning training.
0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Epoch 0/9
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 2984.032
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.train... | RuntimeError |
def __init__(self) -> None:
self._predictions_labels_covariance = Covariance()
self._predictions_variance = Covariance()
self._labels_variance = Covariance()
| def __init__(self) -> None:
self._predictions_labels_covariance = Covariance()
self._predictions_variance = Covariance()
self._labels_variance = Covariance()
self._device = torch.device("cpu")
| https://github.com/allenai/allennlp/issues/4623 | 0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Beginning training.
0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Epoch 0/9
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 2984.032
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.train... | RuntimeError |
def __call__(
self,
predictions: torch.Tensor,
gold_labels: torch.Tensor,
mask: Optional[torch.BoolTensor] = None,
):
"""
# Parameters
predictions : `torch.Tensor`, required.
A tensor of predictions of shape (batch_size, ...).
gold_labels : `torch.Tensor`, required.
A te... | def __call__(
self,
predictions: torch.Tensor,
gold_labels: torch.Tensor,
mask: Optional[torch.BoolTensor] = None,
):
"""
# Parameters
predictions : `torch.Tensor`, required.
A tensor of predictions of shape (batch_size, ...).
gold_labels : `torch.Tensor`, required.
A te... | https://github.com/allenai/allennlp/issues/4623 | 0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Beginning training.
0 | 2020-09-03 12:39:41,240 - INFO - allennlp.training.trainer - Epoch 0/9
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.trainer - Worker 0 memory usage MB: 2984.032
0 | 2020-09-03 12:39:41,241 - INFO - allennlp.training.train... | RuntimeError |
def infer_params(cls: Type[T], constructor: Callable[..., T] = None) -> Dict[str, Any]:
if cls == FromParams:
return {}
if constructor is None:
constructor = cls.__init__
signature = inspect.signature(constructor)
parameters = dict(signature.parameters)
has_kwargs = False
for p... | def infer_params(cls: Type[T], constructor: Callable[..., T] = None):
if constructor is None:
constructor = cls.__init__
signature = inspect.signature(constructor)
parameters = dict(signature.parameters)
has_kwargs = False
for param in parameters.values():
if param.kind == param.VA... | https://github.com/allenai/allennlp/issues/4614 | Traceback (most recent call last):
File "tmp.py", line 10, in <module>
Foo.from_params(Params({"a": 2, "b": "hi"}))
File "/Users/evanw/AllenAI/allennlp/allennlp/common/from_params.py", line 610, in from_params
kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras)
File "/Users/evanw/AllenAI/allennlp/alle... | RuntimeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.