Closed
Bug 1597731
Opened 6 years ago
Closed 6 years ago
[python3][sync] TypeError when running with Python 3
Categories
(Webtools Graveyard :: Pontoon, defect, P2)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: adrian, Assigned: adrian)
Details
Testing sync on stage, this error appears in the logs:
[2019-11-19 16:53:53,292: ERROR/ForkPoolWorker-1] Task pontoon.sync.tasks.sync_project[d69f0bf3-d391-4b9a-85b8-837eecc68b91] raised unexpected: TypeError("a bytes-like object is required, not 'str'")
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/application_celery.py", line 84, in wrapper
return wrapped(*args, **kwargs)
File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
return self.run(*args, **kwargs)
File "/app/pontoon/sync/core.py", line 64, in wrapped_func
return func(self, *args, **kwargs)
File "/app/pontoon/sync/tasks.py", line 110, in sync_project
source_changes = sync_sources(db_project, now, force, no_pull)
File "/app/pontoon/sync/tasks.py", line 152, in sync_sources
db_project, now, full_scan=force
File "/app/pontoon/sync/core.py", line 32, in update_originals
added_paths, removed_paths, changed_paths = update_resources(db_project, vcs_project)
File "/app/pontoon/sync/core.py", line 108, in update_resources
vcs_changed_files, vcs_removed_files = vcs_project.changed_source_files
File "/app/.heroku/python/lib/python3.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/app/pontoon/sync/vcs/models.py", line 138, in changed_source_files
source_resources_repo.type, source_directory, last_revision
File "/app/pontoon/sync/vcs/repositories.py", line 421, in get_changed_files
return repo.get_changed_files(path, revision), repo.get_removed_files(path, revision)
File "/app/pontoon/sync/vcs/repositories.py", line 354, in get_changed_files
return [line.split()[1] for line in output.split('\n') if line and line[0] in statuses]
TypeError: a bytes-like object is required, not 'str'
Assignee | ||
Comment 1•6 years ago
|
||
adngdb merged PR #1509: "Bug 1585252 - Fix string encoding errors for sync with Python 3." in 9b79186.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Assignee: nobody → adrian
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•