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

TypeError: sequence item 0: expected str instance, bytes found #721

Closed
fafhrd91 opened this issue Nov 13, 2012 · 1 comment
Closed

TypeError: sequence item 0: expected str instance, bytes found #721

fafhrd91 opened this issue Nov 13, 2012 · 1 comment

Comments

@fafhrd91
Copy link

python3.3

from pyramid.view import render_view
from pyramid.request import Request
from pyramid.config import Configurator

config = Configurator(settings={})

def view(request):
    request.response.text = '<body></body>'
    return request.response

config.add_view(name='test', view=view)
config.commit()

r = Request({})
r.registry = config.registry

print (render_view(object(), r, 'test'))

exception:

Traceback (most recent call last):
  File "./test.py", line 19, in <module>
    print (render_view(object(), r, 'test'))
  File ".../pyramid-1.4a3-py3.3.egg/pyramid/view.py", line 140, in render_view
    return ''.join(iterable)
TypeError: sequence item 0: expected str instance, bytes found
@avolkov
Copy link
Contributor

avolkov commented Nov 13, 2012

I think I have a fix for the problem. See my pull request -- #725

luigimassa added a commit to luigimassa/l10n-italy that referenced this issue Oct 7, 2020
Con Odoo 12 ho ricevuto questo errore
General failure when trying to fetch mail from pop server pec.
`Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/odoo/addons/l10n_it_fatturapa_pec/models/fetchmail.py", line 105, in fetch_mail
    message = '\n'.join(messages)
TypeError: sequence item 0: expected str instance, bytes found`

Ho risolto il problema in quanto anche il modulo standard aveva lo stesso errore.
Ecco il link del bug sullo standard
Pylons/pyramid#721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants