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

Bugzilla search fails with TypeError: Parser must be a string or character stream, not datetime #740

Closed
Mossop opened this issue Jul 15, 2020 · 1 comment · Fixed by #759

Comments

@Mossop
Copy link

Mossop commented Jul 15, 2020

Using the latest master from this repository I'm trying to create tasks from a custom search on Mozilla's bugzilla for bugs that have a flag set on me. This is what I'm getting. A similar search for bugs that are assigned to me is working fine.

Traceback (most recent call last):
  File "/home/dave/dotfiles/external/pyenv/versions/bugwarrior/bin/bugwarrior-pull", line 8, in <module>
    sys.exit(pull())
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/db.py", line 317, in synchronize
    issue_dict = dict(issue)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/services/__init__.py", line 414, in keys
    return list(self.__iter__())
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/services/__init__.py", line 409, in __iter__
    record = self.get_taskwarrior_record()
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/services/__init__.py", line 305, in get_taskwarrior_record
    self._taskwarrior_record = self.to_taskwarrior()
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/services/bz.py", line 83, in to_taskwarrior
    task[self.NEEDINFO] = self.parse_date(self.extra.get('needinfo_since'))
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/bugwarrior/services/__init__.py", line 345, in parse_date
    date = parse_date(date)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 1374, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 646, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 725, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 207, in split
    return list(cls(s))
  File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/dateutil/parser/_parser.py", line 76, in __init__
    '{itype}'.format(itype=instream.__class__.__name__))
TypeError: Parser must be a string or character stream, not datetime
@sefeng211
Copy link

This is the commit that causing this 4592952

ryneeverett added a commit to ryneeverett/bugwarrior that referenced this issue Sep 29, 2020
Conform to the dominant pattern of serializing dates in
Issue.totaskwarrior. Resolve GothenburgBitFactory#740.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this issue Sep 29, 2020
Conform to the dominant pattern of deserializing dates in
Issue.totaskwarrior. Resolve GothenburgBitFactory#740.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this issue Sep 29, 2020
Conform to the dominant pattern of deserializing dates in
Issue.to_taskwarrior. Resolve GothenburgBitFactory#740.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this issue Sep 29, 2020
Conform to the dominant pattern of deserializing dates in
Issue.to_taskwarrior. Resolve GothenburgBitFactory#740.
ryneeverett added a commit that referenced this issue Oct 11, 2020
Conform to the dominant pattern of deserializing dates in
Issue.to_taskwarrior. Resolve #740.
NexAdn pushed a commit to NexAdn/bugwarrior that referenced this issue Sep 19, 2024
Conform to the dominant pattern of deserializing dates in
Issue.to_taskwarrior. Resolve GothenburgBitFactory#740.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants