文件操作 - debughelpers.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/flask/__pycache__/debughelpers.cpython-311.pyc
编辑文件内容
� �j�b� � � � d dl ZddlmZ ddlmZ ddlmZ G d� dee � � Z G d� d ee� � Z G d � de� � Z d� Zd ej fd�Zded dfd�ZdS )� N� )�Flask)� Blueprint)�request_ctxc � � e Zd ZdZdS )�UnexpectedUnicodeErrorzjRaised in places where we want some better error reporting for unexpected unicode or binary data. N)�__name__� __module__�__qualname__�__doc__� � �4/usr/lib/python3/dist-packages/flask/debughelpers.pyr r s � � � � � �� � � r r c � � e Zd ZdZd� Zd� ZdS )�DebugFilesKeyErrorz�Raised from request.files during debugging. The idea is that it can provide a better error message than just a generic KeyError/BadRequest. c � � |j � |� � }d|�d|j �d�g}|r7d� d� |D � � � � }|� d|� �� � d� |� � | _ d S )NzYou tried to access the file zX in the request.files dictionary but it does not exist. The mimetype for the request is z� instead of 'multipart/form-data' which means that no file contents were transmitted. To fix this error you should provide enctype="multipart/form-data" in your form.z, c 3 �4 K � | ]}t |� � V � �d S �N)�repr��.0�xs r � <genexpr>z.DebugFilesKeyError.__init__.<locals>.<genexpr> s( � � � �<�<�!�d�1�g�g�<�<�<�<�<�<r zG The browser instead transmitted some file names. This was submitted: � )�form�getlist�mimetype�join�append�msg)�self�request�key�form_matches�buf�namess r �__init__zDebugFilesKeyError.__init__ s� � ��|�+�+�C�0�0�� ;�C� ;� ;�"�+� ;� ;� ;� �� � ��I�I�<�<�|�<�<�<�<�<�E��J�J�/�',�/� /� � � � �7�7�3�<�<����r c � � | j S r )r )r! s r �__str__zDebugFilesKeyError.__str__% s � ��x�r N)r r r r r'