nm523 / pyamex Goto Github PK
View Code? Open in Web Editor NEWPython library for accessing American Express account data
License: MIT License
Python library for accessing American Express account data
License: MIT License
Since few weeks my code using pyamex stop working at:
client = AmexClient(username='xxxxxxxx', password='xxxxxxx', locale='en_GB')
accounts = client.accounts()
Traceback (most recent call last):
File "", line 1, in
File "/home/xxxxxx/.local/lib/python3.7/site-packages/pyamex/client.py", line 66, in accounts
xml_tree = xml.etree.cElementTree.fromstring(response)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1315, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
Just curious if its me doing something wrong, an actual bug in the code, or if the Amex API is no longer available. I try to run your example file and get:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-13-4465971edafd> in <module>
----> 1 client.accounts()
/opt/conda/envs/Python3.6/lib/python3.6/site-packages/pyamex/client.py in accounts(self)
75 accounts = [
76 self.create_account(account)
---> 77 for account in xml_tree.find('CardAccounts')
78 ]
79
/opt/conda/envs/Python3.6/lib/python3.6/site-packages/pyamex/client.py in <listcomp>(.0)
75 accounts = [
76 self.create_account(account)
---> 77 for account in xml_tree.find('CardAccounts')
78 ]
79
/opt/conda/envs/Python3.6/lib/python3.6/site-packages/pyamex/client.py in create_account(self, account_tree)
99 account_data['client'] = self
100
--> 101 for param in account_tree.find('CardData'):
102 name = param.attrib['name']
103 account_data[name] = param.text
TypeError: 'NoneType' object is not iterable
I dug through the code found the urls you had in the comments and tried them in Chrome and they appear dead. Is it still working for you?
Working code example using the examples/amex_to_pandas.py script, and passing in a billing
period greater than 1.
This might just be an issue on Amex's side, but we'll have to see.
Error message:
`
<XMLResponse>
<ServiceResponse>
<Status>fail</Status>
<Message>Our System is not responding. Please try after sometime or call Customer Service.</Message>
<MessageCode>0005</MessageCode>
</ServiceResponse>
</XMLResponse>`
Unable to import anything from pyamex. I installed it using pip3 which returns Requirement already satisfied. I tried setup.py which writes successfully. My pycharm recognizes the package but it has only accounts, account and client within it. Even these return ImportError while trying to access.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.