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

AttributeError: 'str' object has no attribute 'isoformat' #23

Closed
beheh opened this issue Feb 5, 2016 · 3 comments
Closed

AttributeError: 'str' object has no attribute 'isoformat' #23

beheh opened this issue Feb 5, 2016 · 3 comments
Labels

Comments

@beheh
Copy link
Member

beheh commented Feb 5, 2016

Traceback (most recent call last):
  File "python/convert.py", line 13, in <module>
    main()
  File "python/convert.py", line 9, in main
    print(log_to_xml(f))
  File "/home/benedict/Dokumente/HSReplay/python/hsreplay/__init__.py", line 314, in log_to_xml
    root.append(game_element.xml())
  File "/home/benedict/Dokumente/HSReplay/python/hsreplay/__init__.py", line 50, in xml
    element.append(node.xml())
  File "/home/benedict/Dokumente/HSReplay/python/hsreplay/__init__.py", line 50, in xml
    element.append(node.xml())
  File "/home/benedict/Dokumente/HSReplay/python/hsreplay/__init__.py", line 59, in xml
    element.attrib["ts"] = self.ts.isoformat()
AttributeError: 'str' object has no attribute 'isoformat'

Power.log.

@beheh beheh added the python label Feb 5, 2016
@beheh
Copy link
Member Author

beheh commented Feb 5, 2016

Introduced by 7ca4724.

@jleclanche
Copy link
Member

Update python-hearthstone
On Feb 5, 2016 12:34, "Benedict Etzel" notifications@github.com wrote:

Introduced by 7ca4724
HearthSim/hsreplay-xml@7ca4724
.


Reply to this email directly or view it on GitHub
https://github.com/HearthSim/HSReplay/issues/23#issuecomment-180288187.

@beheh
Copy link
Member Author

beheh commented Feb 5, 2016

Now I'm getting

WARNING:root:python-dateutil is not installed. Timestamp parsing may not work properly.
Traceback (most recent call last):
  File "./convert.py", line 13, in <module>
    main()
  File "./convert.py", line 9, in main
    print(log_to_xml(f))
  File "/home/benedict/Dokumente/HSReplay/python/hsreplay/__init__.py", line 302, in log_to_xml
    parser.read(fp)
  File "/home/benedict/Dokumente/HSReplay/python/src/hearthstone/hearthstone/hslog/parser.py", line 445, in read
    self.read_line(line)
  File "/home/benedict/Dokumente/HSReplay/python/src/hearthstone/hearthstone/hslog/parser.py", line 453, in read_line
    ts = self.parse_timestamp(ts)
  File "/home/benedict/Dokumente/HSReplay/python/src/hearthstone/hearthstone/hslog/parser.py", line 437, in parse_timestamp
    ret = parse_timestamp(ts)
  File "/home/benedict/Dokumente/HSReplay/python/src/hearthstone/hearthstone/hslog/parser.py", line 22, in parse_timestamp
    return datetime.strptime(ts[:-1], self.timestamp_format)
NameError: name 'self' is not defined

Maybe that should be a dependency?

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

No branches or pull requests

2 participants