Skip to content

cmd client is not able to parse arguments correctly #46

@chbndrhnns

Description

@chbndrhnns

Here is the next issue:

pynynab ofximport --email bla --password bla --budgetname bla (no ofx file given)

seem to use ofximport as file name:

Traceback (most recent call last):
  File "/Users/jo/.virtualenvs/m2ynab/bin/pynynab", line 11, in <module>
    load_entry_point('pynYNAB===dev', 'console_scripts', 'pynynab')()
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/pynYNAB-dev-py2.7.egg/pynYNAB/__main__.py", line 127, in main
    MainCommands()
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/pynYNAB-dev-py2.7.egg/pynYNAB/__main__.py", line 62, in __init__
    getattr(self, args.command)()
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/pynYNAB-dev-py2.7.egg/pynYNAB/__main__.py", line 110, in ofximport
    delta = do_ofximport(args,client)
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/pynYNAB-dev-py2.7.egg/pynYNAB/scripts/ofximport.py", line 17, in do_ofximport
    tree.parse(args.ofxfile,codec='cp1252')
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/ofxtools-0.5-py2.7.egg/ofxtools/Parser.py", line 31, in parse
    source = self._read(source, codec)  # Now it's a string
  File "/Users/jo/.virtualenvs/m2ynab/lib/python2.7/site-packages/ofxtools-0.5-py2.7.egg/ofxtools/Parser.py", line 68, in _read
    source = open(source, 'rb')
IOError: [Errno 2] No such file or directory: 'ofximport'

pynynab ofximport --email bla --password bla --budgetname bla sample.ofx

fails with

pynYNAB OFX import
usage: pynynab [-h] [--email Email] [--password Password]
               [--budgetname BudgetName]
               OFXPath
pynynab: error: unrecognized arguments: sample.ofx

My ynab.conf in the working directory is ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions