Closed solonky closed 4 years ago
I keep getting errors for the 'end' and 'flush' that are kwargs in many logger statements but these kwargs don't exist in the self._log in the logging module i.e. logger.warning('\r[DarwinInfoAPI] Getting Quotes for DARWIN {} / {}: ${}'.format(_count, len(_symbols), darwin), end='', flush=True)
@Eriz11 - fyi
Hi @solonky!
¿Could you please post a minimal code example so that I can reproduce the problem?
Furthermore, please paste your actual conda
environment package versions.
Thanks,
Hi @Eriz11!
Here is the snippet I am trying to run:
from darwinexapis.API.InfoAPI.DWX_Info_API import DWX_Info_API
from darwinexapis.API.InfoAPI.DWX_Info_API import DWX_Info_API
darwinexInfo = DWX_Info_API(AUTH_CREDS, _version=2.0, _demo=True)
_p = darwinexInfo._Get_Historical_Quotes_(_symbols=['PLF', 'THA'])
and the versions of the packages used (python 3.7): darwinexapis==0.3.5 logging==0.5.1.2
Okey, just tried it and seen the error.
Just a mistake on the migration with the change of print
statements to the logging
module.
It should be fixed in the actual version of the package, so be sure to issue a:
pip install -U darwinexapis
to upgrade the package!
Thanks for pointing out the bug!
upgraded and it works. Thanks!
Traceback (most recent call last): File "/opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-4-cd477610cd18>", line 1, in <module> _p = darwinexInfo._Get_Historical_Quotes_(_symbols=['PLF', 'THA']) File "/opt/anaconda3/lib/python3.7/site-packages/darwinexapis/API/InfoAPI/DWX_Info_API.py", line 59, in _Get_Historical_Quotes_ end='', flush=True) File "/opt/anaconda3/lib/python3.7/logging/__init__.py", line 1390, in warning self._log(WARNING, msg, args, **kwargs) TypeError: _log() got an unexpected keyword argument 'end'