pycsw icon indicating copy to clipboard operation
pycsw copied to clipboard

Error when call harvest with respondHandler after fix #666

Open Jrmy-Msn opened this issue 4 years ago • 1 comments

Description

After fix #666 New error comes on FTP process.

Trace ... site-packages/pycsw/server.py", line 862, in _process_responsehandler ftp.storbinary('STOR %s' % uprh.path[1:], StringIO(xml)) TypeError: initial_value must be str or None, not bytes

effectively, when I log type(xml) it return

If I replace StringIO by BytesIO, it works

best regards

Environment

  • operating system:
  • Python version: 3.7
  • pycsw version: 2.6
  • source/distribution
    • [ ] git clone
    • [ ] DebianGIS/UbuntuGIS
    • [x ] PyPI
    • [ ] zip/tar.gz
    • [ ] other (please specify):
  • web server
    • [ x] Apache/mod_wsgi
    • [ ] CGI
    • [ ] other (please specify):

Steps to Reproduce

Additional Information

Jrmy-Msn avatar Mar 12 '21 19:03 Jrmy-Msn

Thanks for the report. Can you provide an example XML request to help reproduce?

tomkralidis avatar May 12 '21 01:05 tomkralidis