kynan / dokuvimki

DokuVimKi is a Vim plugin which allows you to edit DokuWiki pages of DokuWikis XML-RPC interface. It also does syntax highlighting for DokuWiki syntax.
MIT License
32 stars 4 forks source link

DWupload error #17

Closed alazyworkaholic closed 4 years ago

alazyworkaholic commented 4 years ago

My DokuVimKi failed on two different machines that edit and save pages and otherwise seem to work correctly.

:DWupload /home/alazy/script.js
Error detected while processing function provider#python3#Call:
line   18:

Error invoking 'python_execute' on channel 3 (python3-script-host):

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 301, in upload
  File "/usr/local/lib/python3.7/dist-packages/dokuwikixmlrpc.py", line 114, in catch_xmlerror
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/dokuwikixmlrpc.py", line 309, in put_file
    return self._xmlrpc.wiki.putAttachment(file_id, xmlrpclib.Binary(data),
  File "/usr/lib/python3.7/xmlrpc/client.py", line 390, in __init__
    data.__class__.__name__)
TypeError: expected bytes or bytearray, not str
Press ENTER or type command to continue

What's going on here?

kynan commented 4 years ago

This looks like a string type compatibility issue. How can I reproduce this error?

kynan commented 4 years ago

OK, that's actually easy to reproduce. And easy to fix. Fix coming.