matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

Checking responseError #75

Open shjin404 opened 4 years ago

shjin404 commented 4 years ago

Handling the exception like below

pdblp.pdblp:INFO:Event Type: 'PARTIAL_RESPONSE'
pdblp.pdblp:INFO:Message Received:
ReferenceDataResponse = {
    responseError = {
        source = "bbdbd2"
        code = -4001
        category = "LIMIT"
        message = "uuid: xxxxxxx, SN: xxxxx, sid: xxxxx Daily capacity reached. [nid:xxxx] "
        subcategory = "DAILY_CAPACITY_REACHED"
    }
}

For pull requests please include the following:

Notes:

To run the git diff on the upstream/master branch make sure this is set up, e.g.

git remote add upstream git@github.com:matthewgilbert/pdblp.git
git fetch upstream

See here for more details.

Unfortunately automated testing using TravisCI is not possible since many tests require a valid Bloomberg connection. Please verify that pytest pdblp/tests -v has been run and all tests are passing.

Commit

For most simple feature implementations please squash your commit to one entry and follow the style of https://chris.beams.io/posts/git-commit/ in your commit message, i.e.

shjin404 commented 4 years ago

@matthewgilbert I just started writing Python code in a few days ago and also new to Github workflow and I am not sure what is wrong with the Travis CI build failure. Can you quickly glance the error and see if there is anything I need to do?

shjin404 commented 4 years ago

@matthewgilbert It seems like Python 3.7 archive is not found according to the log. Can you see if you can fix it?

Downloading archive: https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/14.04/x86_64/python-3.7.tar.bz2 travis_time:start:13f0cc32 $ curl -sSf --retry 5 -o python-3.7.tar.bz2 ${archive_url} curl: (22) The requested URL returned error: 404 Not Found travis_time:end:13f0cc32:start=1575224763792916890,finish=1575224763840117564,duration=47200674,event=configure Unable to download 3.7 archive. The archive may not exist. Please consider a different version.

shjin404 commented 4 years ago

Another CI pipeline fails with the error below which I believe the master branch was failing already. This https://github.com/pytest-dev/pytest/issues/1688 seems to be related??

==================================== ERRORS ==================================== __ ERROR collecting pdblp/tests/test_pdblp.py __ pdblp/tests/test_pdblp.py:88: in  ifbbg = pytest.mark.skipif(pytest.config.cache.get('offline', False), E AttributeError: module 'pytest' has no attribute 'config' !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 0.16s =============================== travis_time:end:0630fa56:start=1575224805702769490,finish=1575224807512339826,duration=1809570336,event=script The command "pytest pdblp/tests -v --offline" exited with 2.