Upload file error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64

As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/235fedf5-e614-4e62-b3d8-c8fd3893249e%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Seems like a bug. Please post the file name.

On Wed, Sep 17, 2014 at 8:16 AM, Y Y ya...@gmail.com wrote:

As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 47, in
uploadfile
ret = frappe.utils.file_manager.upload()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 33, in upload
filedata = save_uploaded(dt, dn)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File “/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py”, line 18,
in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 58-64:
ordinal not in range(128)


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/235fedf5-e614-4e62-b3d8-c8fd3893249e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext

新东方名师推荐BEC词汇.doc

above is the file name, it is local file name in chinese.


在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
That file name works for me too....

I am running Python 2.7.5

@Pratik any clue?



@rushabh_mehta

On 17-Sep-2014, at 1:04 pm, Y Y <ya...@gmail.com> wrote:

新东方名师推荐BEC词汇.doc

above is the file name, it is local file name in chinese.


在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)

-- 
Note:
 
If you are posting an issue,
 
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
--- 
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta rm...@gmail.com wrote:

That file name works for me too…

I am running Python 2.7.5

@Pratik any clue?

@rushabh_mehta
https://erpnext.com

On 17-Sep-2014, at 1:04 pm, Y Y ya...@gmail.com wrote:

新东方名师推荐BEC词汇.doc

above is the file name, it is local file name in chinese.

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:

As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 47,
in uploadfile
ret = frappe.utils.file_manager.upload()
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line
33, in upload
filedata = save_uploaded(dt, dn)
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line
52, in save_uploaded
return save_file(fname, content, dt, dn);
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line
118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line
254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File “/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py”, line
18, in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position
58-64: ordinal not in range(128)


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

No idea,

worked on demo.frappecloud.com too

curl https://demo.frappecloud.com/files/新东方名师推荐BEC词汇762117.doc


Pratik
erpnext

mine is 2.7.3, maybe it's time to re-setup from scratch. will update. thanks.

在 2014年9月18日星期四UTC+8下午1时14分42秒,Pratik Vyas写道:
On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta <rm...@gmail.com> wrote:
> That file name works for me too....
>
> I am running Python 2.7.5
>
> @Pratik any clue?
>
>
>
> @rushabh_mehta
> https://erpnext.com
>
> On 17-Sep-2014, at 1:04 pm, Y Y <ya...@gmail.com> wrote:
>
> 新东方名师推荐BEC词汇.doc
>
> above is the file name, it is local file name in chinese.
>
>
> 在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
>>
>> As subject. if file name is local language. Please suggest how to fix.
>>
>> Traceback (innermost last):
>> File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47,
>> in uploadfile
>> ret = frappe.utils.file_manager.upload()
>> File
>> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line
>> 33, in upload
>> filedata = save_uploaded(dt, dn)
>> File
>> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line
>> 52, in save_uploaded
>> return save_file(fname, content, dt, dn);
>> File
>> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line
>> 118, in save_file
>> fname = get_file_name(fname, content_hash[-6:])
>> File
>> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line
>> 254, in get_file_name
>> if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
>> File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line
>> 18, in exists
>> os.stat(path)
>> UnicodeEncodeError: 'ascii' codec can't encode characters in position
>> 58-64: ordinal not in range(128)
>
>
> --
> Note:
>
> If you are posting an issue,
>
> 1. ERPNext is a free and open source software and support is given on this
> forum by a team (https://frappe.io/webnotes). So please consider donating if
> you find this forum useful (https://frappe.io/buy). Even a small amount
> would be helpful.
> 2. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 4. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer-forum+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Note:
>
> If you are posting an issue,
>
> 1. ERPNext is a free and open source software and support is given on this
> forum by a team (https://frappe.io/webnotes). So please consider donating if
> you find this forum useful (https://frappe.io/buy). Even a small amount
> would be helpful.
> 2. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 4. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer-forum+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

No idea,

worked on demo.frappecloud.com too

curl https://demo.frappecloud.com/files/%E6%96%B0%E4%B8%9C%E6%96%B9%E5%90%8D%E5%B8%88%E6%8E%A8%E8%8D%90BEC%E8%AF%8D%E6%B1%87762117.doc


--
Pratik
erpnext



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d38ada52-728f-4d97-afef-0de5217719c5%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname))

Can you try changing that line to

if len(n_records) > 0 or os.path.exists(get_files_path(fname.encode(‘utf-8’)))

On Thu, Sep 18, 2014 at 11:01 AM, Y Y ya...@gmail.com wrote:

mine is 2.7.3, maybe it’s time to re-setup from scratch. will update.
thanks.

在 2014年9月18日星期四UTC+8下午1时14分42秒,Pratik Vyas写道:

On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta rm...@gmail.com wrote:

That file name works for me too…

I am running Python 2.7.5

@Pratik any clue?

@rushabh_mehta
https://erpnext.com

On 17-Sep-2014, at 1:04 pm, Y Y ya...@gmail.com wrote:

新东方名师推荐BEC词汇.doc

above is the file name, it is local file name in chinese.

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:

As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line
47,
in uploadfile
ret = frappe.utils.file_manager.upload()
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
33, in upload
filedata = save_uploaded(dt, dn)
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
52, in save_uploaded
return save_file(fname, content, dt, dn);
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File “/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py”,
line
18, in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position
58-64: ordinal not in range(128)


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on
    this
    forum by a team (https://frappe.io/webnotes). So please consider
    donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as
    much
    information as you can. Please see it from the point of view of the
    person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and
    send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services.
    Do
    not send images as attachments. Links are good. Same goes for any file
    you
    are going to send.

End of Note

You received this message because you are subscribed to the Google
Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on
    this
    forum by a team (https://frappe.io/webnotes). So please consider
    donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as
    much
    information as you can. Please see it from the point of view of the
    person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and
    send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services.
    Do
    not send images as attachments. Links are good. Same goes for any file
    you
    are going to send.

End of Note

You received this message because you are subscribed to the Google
Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

No idea,

worked on demo.frappecloud.com too

curl
https://demo.frappecloud.com/files/新东方名师推荐BEC词汇762117.doc


Pratik
erpnext


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (https://frappe.io/webnotes). So please consider donating if
    you find this forum useful (https://frappe.io/buy). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/d38ada52-728f-4d97-afef-0de5217719c5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext

Sorry, I meant whatever Anand is saying here,

On Thu, Sep 18, 2014 at 3:20 PM, Pratik Vyas pd...@gmail.com wrote:

File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname))

Can you try changing that line to

if len(n_records) > 0 or os.path.exists(get_files_path(fname.encode(‘utf-8’)))

On Thu, Sep 18, 2014 at 11:01 AM, Y Y ya...@gmail.com wrote:

mine is 2.7.3, maybe it’s time to re-setup from scratch. will update.
thanks.

在 2014年9月18日星期四UTC+8下午1时14分42秒,Pratik Vyas写道:

On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta rm...@gmail.com wrote:

That file name works for me too…

I am running Python 2.7.5

@Pratik any clue?

@rushabh_mehta
https://erpnext.com

On 17-Sep-2014, at 1:04 pm, Y Y ya...@gmail.com wrote:

新东方名师推荐BEC词汇.doc

above is the file name, it is local file name in chinese.

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:

As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line
47,
in uploadfile
ret = frappe.utils.file_manager.upload()
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
33, in upload
filedata = save_uploaded(dt, dn)
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
52, in save_uploaded
return save_file(fname, content, dt, dn);
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File
“/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”,
line
254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File “/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py”,
line
18, in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position
58-64: ordinal not in range(128)


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on
    this
    forum by a team (Not Found). So please consider
    donating if
    you find this forum useful (Not Found). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as
    much
    information as you can. Please see it from the point of view of the
    person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and
    send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services.
    Do
    not send images as attachments. Links are good. Same goes for any file
    you
    are going to send.

End of Note

You received this message because you are subscribed to the Google
Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
For more options, visit Inloggen - Google Accounts.


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on
    this
    forum by a team (Not Found). So please consider
    donating if
    you find this forum useful (Not Found). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as
    much
    information as you can. Please see it from the point of view of the
    person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and
    send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services.
    Do
    not send images as attachments. Links are good. Same goes for any file
    you
    are going to send.

End of Note

You received this message because you are subscribed to the Google
Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.

For more options, visit Inloggen - Google Accounts.

No idea,

worked on demo.frappecloud.com too

curl
https://demo.frappecloud.com/files/新东方名师推荐BEC词汇762117.doc


Pratik
erpnext


Note:

If you are posting an issue,

  1. ERPNext is a free and open source software and support is given on this
    forum by a team (Not Found). So please consider donating if
    you find this forum useful (Not Found). Even a small amount
    would be helpful.
  2. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/d38ada52-728f-4d97-afef-0de5217719c5%40googlegroups.com.

For more options, visit Inloggen - Google Accounts.


Pratik
erpnext


Pratik
erpnext

Tried, not work at my side, anyway, i think we will setup from scratch and try. Thanks very much.

在 2014年9月18日星期四UTC+8下午5时54分29秒,Pratik Vyas写道:
Sorry, I meant whatever Anand is saying here,
https://github.com/frappe/frappe/issues/847#issuecomment-55999093

On Thu, Sep 18, 2014 at 3:20 PM, Pratik Vyas <pd...@gmail.com> wrote:
> File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
> line 254, in get_file_name
> if len(n_records) > 0 or os.path.exists(get_files_path(fname))
>
> Can you try changing that line to
>
> if len(n_records) > 0 or os.path.exists(get_files_path(fname.encode('utf-8')))
>
> On Thu, Sep 18, 2014 at 11:01 AM, Y Y <ya...@gmail.com> wrote:
>> mine is 2.7.3, maybe it's time to re-setup from scratch. will update.
>> thanks.
>>
>> 在 2014年9月18日星期四UTC+8下午1时14分42秒,Pratik Vyas写道:
>>>
>>> On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta <rm...@gmail.com> wrote:
>>> > That file name works for me too....
>>> >
>>> > I am running Python 2.7.5
>>> >
>>> > @Pratik any clue?
>>> >
>>> >
>>> >
>>> > @rushabh_mehta
>>> > https://erpnext.com
>>> >
>>> > On 17-Sep-2014, at 1:04 pm, Y Y <ya...@gmail.com> wrote:
>>> >
>>> > 新东方名师推荐BEC词汇.doc
>>> >
>>> > above is the file name, it is local file name in chinese.
>>> >
>>> >
>>> > 在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
>>> >>
>>> >> As subject. if file name is local language. Please suggest how to fix.
>>> >>
>>> >> Traceback (innermost last):
>>> >> File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line
>>> >> 47,
>>> >> in uploadfile
>>> >> ret = frappe.utils.file_manager.upload()
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 33, in upload
>>> >> filedata = save_uploaded(dt, dn)
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 52, in save_uploaded
>>> >> return save_file(fname, content, dt, dn);
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 118, in save_file
>>> >> fname = get_file_name(fname, content_hash[-6:])
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 254, in get_file_name
>>> >> if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
>>> >> File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py",
>>> >> line
>>> >> 18, in exists
>>> >> os.stat(path)
>>> >> UnicodeEncodeError: 'ascii' codec can't encode characters in position
>>> >> 58-64: ordinal not in range(128)
>>> >
>>> >
>>> > --
>>> > Note:
>>> >
>>> > If you are posting an issue,
>>> >
>>> > 1. ERPNext is a free and open source software and support is given on
>>> > this
>>> > forum by a team (https://frappe.io/webnotes). So please consider
>>> > donating if
>>> > you find this forum useful (https://frappe.io/buy). Even a small amount
>>> > would be helpful.
>>> > 2. We should be able to replicate it at our end. So please give us as
>>> > much
>>> > information as you can. Please see it from the point of view of the
>>> > person
>>> > receiving the communication.
>>> > 3. Paste your code at http://pastebin.com or http://gist.github.com and
>>> > send
>>> > only the URL via email
>>> > 4. For sending images, use http://imgur.com or other similar services.
>>> > Do
>>> > not send images as attachments. Links are good. Same goes for any file
>>> > you
>>> > are going to send.
>>> >
>>> > End of Note
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "ERPNext Developer Forum" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to erpnext-developer-forum+un...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> >
>>> > https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>> >
>>> >
>>> > --
>>> > Note:
>>> >
>>> > If you are posting an issue,
>>> >
>>> > 1. ERPNext is a free and open source software and support is given on
>>> > this
>>> > forum by a team (https://frappe.io/webnotes). So please consider
>>> > donating if
>>> > you find this forum useful (https://frappe.io/buy). Even a small amount
>>> > would be helpful.
>>> > 2. We should be able to replicate it at our end. So please give us as
>>> > much
>>> > information as you can. Please see it from the point of view of the
>>> > person
>>> > receiving the communication.
>>> > 3. Paste your code at http://pastebin.com or http://gist.github.com and
>>> > send
>>> > only the URL via email
>>> > 4. For sending images, use http://imgur.com or other similar services.
>>> > Do
>>> > not send images as attachments. Links are good. Same goes for any file
>>> > you
>>> > are going to send.
>>> >
>>> > End of Note
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "ERPNext Developer Forum" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to erpnext-developer-forum+un...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> >
>>> > https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.
>>> >
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> No idea,
>>>
>>> worked on demo.frappecloud.com too
>>>
>>> curl
>>> https://demo.frappecloud.com/files/%E6%96%B0%E4%B8%9C%E6%96%B9%E5%90%8D%E5%B8%88%E6%8E%A8%E8%8D%90BEC%E8%AF%8D%E6%B1%87762117.doc
>>>
>>>
>>> --
>>> Pratik
>>> erpnext
>>
>> --
>> Note:
>>
>> If you are posting an issue,
>>
>> 1. ERPNext is a free and open source software and support is given on this
>> forum by a team (https://frappe.io/webnotes). So please consider donating if
>> you find this forum useful (https://frappe.io/buy). Even a small amount
>> would be helpful.
>> 2. We should be able to replicate it at our end. So please give us as much
>> information as you can. Please see it from the point of view of the person
>> receiving the communication.
>> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
>> only the URL via email
>> 4. For sending images, use http://imgur.com or other similar services. Do
>> not send images as attachments. Links are good. Same goes for any file you
>> are going to send.
>>
>> End of Note
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ERPNext Developer Forum" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to erpnext-developer-forum+un...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/erpnext-developer-forum/d38ada52-728f-4d97-afef-0de5217719c5%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Pratik
> erpnext



--
Pratik
erpnext



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/c56f76df-f0ce-4e02-a851-cfee9377c13f%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Tried, not work at my side, anyway, i think we will setup from scratch and try. Thanks very much.

在 2014年9月18日星期四UTC+8下午5时54分29秒,Pratik Vyas写道:
Sorry, I meant whatever Anand is saying here,
https://github.com/frappe/frappe/issues/847#issuecomment-55999093

On Thu, Sep 18, 2014 at 3:20 PM, Pratik Vyas <pd...@gmail.com> wrote:
> File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
> line 254, in get_file_name
> if len(n_records) > 0 or os.path.exists(get_files_path(fname))
>
> Can you try changing that line to
>
> if len(n_records) > 0 or os.path.exists(get_files_path(fname.encode('utf-8')))
>
> On Thu, Sep 18, 2014 at 11:01 AM, Y Y <ya...@gmail.com> wrote:
>> mine is 2.7.3, maybe it's time to re-setup from scratch. will update.
>> thanks.
>>
>> 在 2014年9月18日星期四UTC+8下午1时14分42秒,Pratik Vyas写道:
>>>
>>> On Thu, Sep 18, 2014 at 10:18 AM, Rushabh Mehta <rm...@gmail.com> wrote:
>>> > That file name works for me too....
>>> >
>>> > I am running Python 2.7.5
>>> >
>>> > @Pratik any clue?
>>> >
>>> >
>>> >
>>> > @rushabh_mehta
>>> > https://erpnext.com
>>> >
>>> > On 17-Sep-2014, at 1:04 pm, Y Y <ya...@gmail.com> wrote:
>>> >
>>> > 新东方名师推荐BEC词汇.doc
>>> >
>>> > above is the file name, it is local file name in chinese.
>>> >
>>> >
>>> > 在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
>>> >>
>>> >> As subject. if file name is local language. Please suggest how to fix.
>>> >>
>>> >> Traceback (innermost last):
>>> >> File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line
>>> >> 47,
>>> >> in uploadfile
>>> >> ret = frappe.utils.file_manager.upload()
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 33, in upload
>>> >> filedata = save_uploaded(dt, dn)
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 52, in save_uploaded
>>> >> return save_file(fname, content, dt, dn);
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 118, in save_file
>>> >> fname = get_file_name(fname, content_hash[-6:])
>>> >> File
>>> >> "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py",
>>> >> line
>>> >> 254, in get_file_name
>>> >> if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
>>> >> File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py",
>>> >> line
>>> >> 18, in exists
>>> >> os.stat(path)
>>> >> UnicodeEncodeError: 'ascii' codec can't encode characters in position
>>> >> 58-64: ordinal not in range(128)
>>> >
>>> >
>>> > --
>>> > Note:
>>> >
>>> > If you are posting an issue,
>>> >
>>> > 1. ERPNext is a free and open source software and support is given on
>>> > this
>>> > forum by a team (https://frappe.io/webnotes). So please consider
>>> > donating if
>>> > you find this forum useful (https://frappe.io/buy). Even a small amount
>>> > would be helpful.
>>> > 2. We should be able to replicate it at our end. So please give us as
>>> > much
>>> > information as you can. Please see it from the point of view of the
>>> > person
>>> > receiving the communication.
>>> > 3. Paste your code at http://pastebin.com or http://gist.github.com and
>>> > send
>>> > only the URL via email
>>> > 4. For sending images, use http://imgur.com or other similar services.
>>> > Do
>>> > not send images as attachments. Links are good. Same goes for any file
>>> > you
>>> > are going to send.
>>> >
>>> > End of Note
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "ERPNext Developer Forum" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to erpnext-developer-forum+un...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> >
>>> > https://groups.google.com/d/msgid/erpnext-developer-forum/079433d5-896c-4dde-9a1b-fee98883da9b%40googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>> >
>>> >
>>> > --
>>> > Note:
>>> >
>>> > If you are posting an issue,
>>> >
>>> > 1. ERPNext is a free and open source software and support is given on
>>> > this
>>> > forum by a team (https://frappe.io/webnotes). So please consider
>>> > donating if
>>> > you find this forum useful (https://frappe.io/buy). Even a small amount
>>> > would be helpful.
>>> > 2. We should be able to replicate it at our end. So please give us as
>>> > much
>>> > information as you can. Please see it from the point of view of the
>>> > person
>>> > receiving the communication.
>>> > 3. Paste your code at http://pastebin.com or http://gist.github.com and
>>> > send
>>> > only the URL via email
>>> > 4. For sending images, use http://imgur.com or other similar services.
>>> > Do
>>> > not send images as attachments. Links are good. Same goes for any file
>>> > you
>>> > are going to send.
>>> >
>>> > End of Note
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "ERPNext Developer Forum" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to erpnext-developer-forum+un...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> >
>>> > https://groups.google.com/d/msgid/erpnext-developer-forum/BD9344FE-5A81-4A97-88E9-FB751324209B%40gmail.com.
>>> >
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> No idea,
>>>
>>> worked on demo.frappecloud.com too
>>>
>>> curl
>>> https://demo.frappecloud.com/files/%E6%96%B0%E4%B8%9C%E6%96%B9%E5%90%8D%E5%B8%88%E6%8E%A8%E8%8D%90BEC%E8%AF%8D%E6%B1%87762117.doc
>>>
>>>
>>> --
>>> Pratik
>>> erpnext
>>
>> --
>> Note:
>>
>> If you are posting an issue,
>>
>> 1. ERPNext is a free and open source software and support is given on this
>> forum by a team (https://frappe.io/webnotes). So please consider donating if
>> you find this forum useful (https://frappe.io/buy). Even a small amount
>> would be helpful.
>> 2. We should be able to replicate it at our end. So please give us as much
>> information as you can. Please see it from the point of view of the person
>> receiving the communication.
>> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
>> only the URL via email
>> 4. For sending images, use http://imgur.com or other similar services. Do
>> not send images as attachments. Links are good. Same goes for any file you
>> are going to send.
>>
>> End of Note
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ERPNext Developer Forum" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to erpnext-developer-forum+un...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/erpnext-developer-forum/d38ada52-728f-4d97-afef-0de5217719c5%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Pratik
> erpnext



--
Pratik
erpnext



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a0bf4fdf-3ce0-4812-89af-156434581080%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that's the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

It is supposed to be ascii by default and it should still work like in my system. Is your bench folder name or some other folder in hierarchy contain non English names?


-Anand

On Monday, September 22, 2014, Y Y <ya…@gmail.com> wrote:
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that’s the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 33, in upload
filedata = save_uploaded(dt, dn)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File “/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py”, line 18, in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF2%3D4hMhQ6L5Ko_HzAK509kG3%3DT3pX2ixEE5jU9eMOr0bQ%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
I fixed that..., It shall be get_files_path(fname).encode('utf-8') haha...

在 2014年9月22日星期一UTC+8下午9时37分01秒,Anand Doshi写道:
It is supposed to be ascii by default and it should still work like in my system. Is your bench folder name or some other folder in hierarchy contain non English names?

-Anand 

On Monday, September 22, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that's the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f75736ad-8652-4e1f-aed9-b5e6f31d89de%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Pull request please 😀

Sent from my phone

On 22-Sep-2014, at 20:01, Y Y <ya...@gmail.com> wrote:

I fixed that..., It shall be get_files_path(fname).encode('utf-8') haha...

在 2014年9月22日星期一UTC+8下午9时37分01秒,Anand Doshi写道:
It is supposed to be ascii by default and it should still work like in my system. Is your bench folder name or some other folder in hierarchy contain non English names?

-Anand 

On Monday, September 22, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that's the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f75736ad-8652-4e1f-aed9-b5e6f31d89de%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7234C117-5C73-4DE7-9423-36A1E7FB5D7C%40iwebnotes.com.

    For more options, visit https://groups.google.com/d/optout.
Against 4 or 5?

在 2014年9月22日星期一UTC+8下午11时15分32秒,Anand Doshi写道:
Pull request please 😀

Sent from my phone

On 22-Sep-2014, at 20:01, Y Y <ya...@gmail.com> wrote:

I fixed that..., It shall be get_files_path(fname).encode('utf-8') haha...

在 2014年9月22日星期一UTC+8下午9时37分01秒,Anand Doshi写道:
It is supposed to be ascii by default and it should still work like in my system. Is your bench folder name or some other folder in hierarchy contain non English names?

-Anand 

On Monday, September 22, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that's the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f75736ad-8652-4e1f-aed9-b5e6f31d89de%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/298f1bb8-693b-43a8-a95f-4d48fbb0b114%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
4 is okay for this.

@rushabh_mehta
via mobile

On 23-Sep-2014, at 6:00 AM, Y Y <ya...@gmail.com> wrote:

Against 4 or 5?

在 2014年9月22日星期一UTC+8下午11时15分32秒,Anand Doshi写道:
Pull request please 😀

Sent from my phone

On 22-Sep-2014, at 20:01, Y Y <ya...@gmail.com> wrote:

I fixed that..., It shall be get_files_path(fname).encode('utf-8') haha...

在 2014年9月22日星期一UTC+8下午9时37分01秒,Anand Doshi写道:
It is supposed to be ascii by default and it should still work like in my system. Is your bench folder name or some other folder in hierarchy contain non English names?

-Anand 

On Monday, September 22, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

In my VM, i enter into python console, then show sys.getdefaultencoding(), result is: ascii

I think that's the issue. why would happens to that, i used same installation setup(via bench).

any simple solution for this?

Thanks,
Yang

在 2014年9月17日星期三UTC+8上午10时46分18秒,Y Y写道:
As subject. if file name is local language. Please suggest how to fix.

Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 47, in uploadfile
ret = frappe.utils.file_manager.upload()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 33, in upload
filedata = save_uploaded(dt, dn)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 52, in save_uploaded
return save_file(fname, content, dt, dn);
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 118, in save_file
fname = get_file_name(fname, content_hash[-6:])
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/file_manager.py", line 254, in get_file_name
if len(n_records) > 0 or os.path.exists(get_files_path(fname)):
File "/home/erpnext/frappe-bench/env/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-64: ordinal not in range(128)


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/27829800-d656-44c3-91d5-23345d9a8d97%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f75736ad-8652-4e1f-aed9-b5e6f31d89de%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/298f1bb8-693b-43a8-a95f-4d48fbb0b114%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/1466A522-2438-47FA-A62C-7A3C150DDCBC%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.