chaiall / epidemic-marketplace

Automatically exported from code.google.com/p/epidemic-marketplace
0 stars 0 forks source link

SimpleEMCLient: Erro upload resource #398

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download simpleemclient
2. login
3. upload resource with a path with special characters

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "./SimpleEmClient_v2-2-1.py", line 586, in <module>
    Run()
  File "./SimpleEmClient_v2-2-1.py", line 168, in __init__
    Menu()
  File "./SimpleEmClient_v2-2-1.py", line 522, in Menu
    uploadFile(pid, filename)
  File "./SimpleEmClient_v2-2-1.py", line 313, in uploadFile
    dataContent = open(filePath, "r")
IOError: [Errno 2] No such file or directory: '/home/pgraca/\xc3\x81rea\\ de\\ 
Trabalho/temp/countries.xml'

Original issue reported on code.google.com by graca.pa...@gmail.com on 24 May 2013 at 12:14

GoogleCodeExporter commented 9 years ago
Também ocorreu este erro quando coloquei noutra path:

Traceback (most recent call last):
  File "./SimpleEmClient_v2-2-1.py", line 586, in <module>
    Run()
  File "./SimpleEmClient_v2-2-1.py", line 168, in __init__
    Menu()
  File "./SimpleEmClient_v2-2-1.py", line 522, in Menu
    uploadFile(pid, filename)
  File "./SimpleEmClient_v2-2-1.py", line 316, in uploadFile
    printResponse(resp)
  File "./SimpleEmClient_v2-2-1.py", line 578, in printResponse
    resp = ET.fromstring(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1643, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1507, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49

Original comment by graca.pa...@gmail.com on 24 May 2013 at 12:21

GoogleCodeExporter commented 9 years ago
Exprimentei com uma pasta chamada "\Teste com espacos" (a primeira barra faz 
mesmo parte do nome" e utilizei o comando abaixo, e funcionou.
Existia um problema relacionado (que pode ou não resolver o que aconteceu), em 
que o nome do datastream a adicionar era a path toda que se passava ao 
programa, em vez de apenas a última parte.

python SimpleEmClient.py -U posse -p pass -u empid:1125 
/Users/posse/Documents/\\Teste\ com\ espacos/SimpleEmClient.py
Login successfull. Welcome posse
Uploading File...

<results>
  <result>
    <datastream>SimpleEmClient.py</datastream>
    <empid>empid:1125</empid>
    <message>Datastream added successfully</message>
    <status>OK</status>
  </result>
</results>

Original comment by tiagoposse on 28 May 2013 at 10:24