Skip to content
This repository was archived by the owner on Sep 5, 2021. It is now read-only.

error with python 3 str #19

@GNHua

Description

@GNHua

I am using python 3.5 to run the example code

>>> import pandoc
>>> doc = pandoc.Document()
>>> doc.markdown = '''
... # I am an H1 Tag
... 
... * bullet point
... * more points
... * point with [link](http://google.com)
... '''
>>> print(doc.rst)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/haocan/Developer/Python/projectforum/venv/lib/python3.5/site-packages/pandoc/core.py", line 78, in <lambda>
    (lambda x, fmt=fmt: cls._output(x, fmt)), # fget
  File "/Users/haocan/Developer/Python/projectforum/venv/lib/python3.5/site-packages/pandoc/core.py", line 97, in _output
    return p.communicate(self._content)[0]
  File "/Users/haocan/anaconda/lib/python3.5/subprocess.py", line 801, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/Users/haocan/anaconda/lib/python3.5/subprocess.py", line 1431, in _communicate
    input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions