Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 481 counter number #482

Open
wants to merge 9 commits into
base: release/2.1.2
Choose a base branch
from

Conversation

nigelmegitt
Copy link
Collaborator

Fixes #481 by allowing the counter value to be specified.

No longer needed because it has been merged into the core.
Track a change to proxy handling in Autobahn / twisted for #477. There's probably a more elegant way, but this works for now... Lacking a test, but have verified it locally.
We don't need the HTTPProxyConfig object at all anymore, just a `dict` will do.
Have seen this error a couple of times during live operation:

```Shell
Unhandled error in Deferred:
[CRITICAL] (2018-05-08 13:43:42,705) in twisted[154] - Unhandled error in Deferred:

[CRITICAL] (2018-05-08 13:43:42,705) in twisted[154] -
Traceback (most recent call last):
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
    result = f(*args, **kw)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/node/consumer.py", line 134, in convert_next_segment
    end=self.last_segment_end + self._segment_length
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/node/consumer.py", line 122, in get_segment
    sequence_number=self._segment_counter
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/documents/ebutt3.py", line 1004, in extract_segment
    document_segments=document_segments
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/documents/ebutt3_splicer.py", line 29, in __init__
    self._do_splice()
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/documents/ebutt3_splicer.py", line 66, in _do_splice
    merged_body = merged_body.merge(current_tt.body, self._dataset)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/bindings/__init__.py", line 974, in merge
    self._merge_deconflict_ids(element=other_elem, dest=merged_body, ids=ids)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/bindings/__init__.py", line 949, in _merge_deconflict_ids
    cls._merge_deconflict_ids(item.value, copied_elem, ids)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/bindings/__init__.py", line 949, in _merge_deconflict_ids
    cls._merge_deconflict_ids(item.value, copied_elem, ids)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/bindings/__init__.py", line 949, in _merge_deconflict_ids
    cls._merge_deconflict_ids(item.value, copied_elem, ids)
  File "/Users/megitn02/Code/ebu/ebu-tt-live-toolkit/ebu_tt_live/bindings/__init__.py", line 942, in _merge_deconflict_ids
    log.debug('processing child: {} of {}'.format(item.value, element))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 1: ordinal not in range(128)
```

So commenting out that line. No idea how that character can appear in the relevant line, it's a £ sign.
@coveralls
Copy link

coveralls commented May 8, 2018

Coverage Status

Coverage decreased (-0.2%) to 84.998% when pulling 8023b7a on issue-481-counter-number into 46c1951 on release/2.1.2.

This strips out unencodable characters and if not fixes, at least masks #483 by using `codecs.open` and telling it to ignore errors.
Part of the fix for #481 - allow the filesystem output carriage begin count to be overridden in the ebuttd-encoder using a first document datetime and a document duration. The zeroth document is calculated as the difference between the current datetime and the specified datetime divided by the document duration.
Add config options documentation for `override_begin_count` and `begin_count`.
@nigelmegitt
Copy link
Collaborator Author

I've just re-reviewed this.

  • No unit tests => can't merge at this time.

This seems to bring in some changes also present in other pull requests, I'm not sure if there's an ordering dependency on merging them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants