Pages: 1 2 3 4 :: [one page] |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Entity
X-Factor Industries
|
Posted - 2007.07.10 10:55:00 -
[1]
Yesterday I released the Python EVE API wrapper I've been working on.
You can find it here: Python EVE API
This wrapper has no external dependencies and will work with any Python version from 2.4 onward, and will likely work with future versions of the EVE API.
An extensive demonstration script is provided.
Feel free to post suggestions for improvements and bug reports here, or mail me ingame.
_
Got Item? | Ship? | Python EVE API? |

Herio Mortis
Raw Edge O X I D E
|
Posted - 2007.07.10 13:44:00 -
[2]
Brilliant, much appreciated. This will come in handy.
----- And *pop* went my ferox... |

foiblealt
|
Posted - 2007.07.29 23:36:00 -
[3]
Getting errors when running apitest.py:
EXAMPLE 4: GETTING CHARACTER SHEET INFORMATION
Traceback (most recent call last): File "apitest.py", line 153, in <module> skilltree = api.eve.SkillTree() File "/home/ibscott/eve/eveapi.py", line 143, in __call__ return self._root(self._path, **kw) File "/home/ibscott/eve/eveapi.py", line 213, in __call__ obj = _Parser().Parse(response, True) File "/home/ibscott/eve/eveapi.py", line 278, in Parse p.ParseFile(data) File "/home/ibscott/eve/eveapi.py", line 287, in tag_start columns = attributes[attributes.index('columns')+1].split(",") ValueError: list.index(x): x not in list
|

Lilian Imp
|
Posted - 2007.07.30 08:43:00 -
[4]
Originally by: foiblealt Getting errors when running apitest.py:
EXAMPLE 4: GETTING CHARACTER SHEET INFORMATION
Traceback (most recent call last): File "apitest.py", line 153, in <module> skilltree = api.eve.SkillTree() File "/home/ibscott/eve/eveapi.py", line 143, in __call__ return self._root(self._path, **kw) File "/home/ibscott/eve/eveapi.py", line 213, in __call__ obj = _Parser().Parse(response, True) File "/home/ibscott/eve/eveapi.py", line 278, in Parse p.ParseFile(data) File "/home/ibscott/eve/eveapi.py", line 287, in tag_start columns = attributes[attributes.index('columns')+1].split(",") ValueError: list.index(x): x not in list
Try This
|

Entity
X-Factor Industries
|
Posted - 2007.07.31 15:55:00 -
[5]
Originally by: foiblealt Getting errors when running apitest.py
Thanks. There appears to be a bug in the data returned by the API, not the actual eveapi.py. I have filed a bug report on this.
_
Got Item? | Ship? | Python EVE API? |

Durente Galaica
Amarr Fortunate Few
|
Posted - 2007.11.10 17:51:00 -
[6]
Originally by: Entity # Now use the Get() method to get a row directly. # Assumes ISD alliance exists. If it doesn't, we probably have bigger # problems than the unhandled exception here -_- print alliances_by_ticker.Get("ISD")
Traceback (most recent call last): File "C:\Documents and Settings\user\EVE\Program\apitest.py", line 239, in <module> print alliances_by_ticker.Get("ISD") File "C:\Documents and Settings\user\EVE\Program\eveapi.py", line 563, in Get raise KeyError, key KeyError: 'ISD'
--------------------------
Sorry I couldn't resist 
On a feedback note, this wrapper is fantastic. I havn't used it more than the test, but after looking through your work, I plan on using it extensivly in the coming weeks! Thanks! 
|

Entity
X-Factor Industries
|
Posted - 2007.11.22 13:50:00 -
[7]
heehee... yeah CCP keeps forgetting to pay the alliance bills it seems 
Thanks for the feedback ♥
_
Got Item? | Ship? | Python EVE API? |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2007.12.12 16:19:00 -
[8]
Edited by: Entity on 12/12/2007 16:20:17 Version 1.0.2 is now available, which fixes an issue with the new formatting of the XML.
I'm probably going to use a different parser for this in the next version because I do not like the current solution much 
_
Got Item? | Ship? | Python EVE API? |

Macdeth
Ephemeral Misgivings
|
Posted - 2007.12.12 18:06:00 -
[9]
Appears to bail on KillLog, CorporationSheet, and I think I saw it somewhere else but API server just went down as I was checking while composing this.
Thanks for writing & actively supporting this thus saving a whole bunch of us the effort!
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2007.12.13 00:21:00 -
[10]
Edited by: Entity on 13/12/2007 00:22:41
Originally by: Macdeth Appears to bail on KillLog, CorporationSheet, and I think I saw it somewhere else but API server just went down as I was checking while composing this.
The KillLog error is indeed a bug in my code, and it's been fixed. v1.0.3 now available for download.
However it looks like CorporationSheet is missing the required columns attribute, which is a bug in the XML. I have informed Garthagk about this and it'll be fix0red SoonÖ
Thanks for pointing this out. _
Got Item? | Ship? | Python EVE API? |
|

SelanirO
Phoibe Enterprises The Fifth Race
|
Posted - 2007.12.18 23:17:00 -
[11]
Many thanks! Very handy
|

Invisible Hand
|
Posted - 2007.12.21 10:04:00 -
[12]
Useful module, thanks for writing this!
Minor bug report: in _autocast() you do:
return int(mktime(strptime(s, "%Y-%m-%d %H:%M:%S")))
However the time strings are in UTC, while mktime expects a tuple in the local timezone. So the parsed values are not the expected seconds-since-epoch value unless your local timezone happens to match UTC. This means that (among other things) you can't just compare cachedUntil to time.time().
I changed my copy to use calendar.timegm() instead of time.mktime() and it works perfectly now - all the time values are parsed into seconds-since-epoch.
|

Elandra Tenari
Gallente StateCorp Veritas Immortalis
|
Posted - 2007.12.21 17:17:00 -
[13]
Thanks for writing this, it's proving very useful.
One minor bug I found whilst processing KillLogs is that the raw Element for the Victim has no attributes. So I changed the if self.container._isrow: section of the tag_end function to pick up attributes on single elements.
My updated version here.
|

Lake
The Praxis Initiative
|
Posted - 2007.12.21 19:02:00 -
[14]
This has made implementing the API-facing section of my latest project utterly trivial. -- eve-mail.net beta - Instant Messaging and E-mail for EVE players. Currently in Beta. |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2007.12.22 08:51:00 -
[15]
Originally by: Invisible Hand Useful module, thanks for writing this!
Minor bug report: in _autocast() you do:
return int(mktime(strptime(s, "%Y-%m-%d %H:%M:%S")))
However the time strings are in UTC, while mktime expects a tuple in the local timezone. So the parsed values are not the expected seconds-since-epoch value unless your local timezone happens to match UTC. This means that (among other things) you can't just compare cachedUntil to time.time().
I changed my copy to use calendar.timegm() instead of time.mktime() and it works perfectly now - all the time values are parsed into seconds-since-epoch.
Hmm, not sure about this one; I convert my local time to UTC before comparing times, and I wanted the input times to stay exactly as they are (which mktime achieves)... I guess it depends on which way you look at the problem :)
I'm not really a fan of timezone stuff in programming, so I might very well be doing this the wrong way around... Comments, anyone?
_
Got Item? | Ship? | Python EVE API? |

Invisible Hand
|
Posted - 2007.12.22 12:50:00 -
[16]
Edited by: Invisible Hand on 22/12/2007 12:52:01
Originally by: Entity
Originally by: Invisible Hand Useful module, thanks for writing this!
Minor bug report: in _autocast() you do:
return int(mktime(strptime(s, "%Y-%m-%d %H:%M:%S")))
However the time strings are in UTC, while mktime expects a tuple in the local timezone. So the parsed values are not the expected seconds-since-epoch value unless your local timezone happens to match UTC. This means that (among other things) you can't just compare cachedUntil to time.time().
I changed my copy to use calendar.timegm() instead of time.mktime() and it works perfectly now - all the time values are parsed into seconds-since-epoch.
Hmm, not sure about this one; I convert my local time to UTC before comparing times, and I wanted the input times to stay exactly as they are (which mktime achieves)... I guess it depends on which way you look at the problem :)
I'm not really a fan of timezone stuff in programming, so I might very well be doing this the wrong way around... Comments, anyone?
The usual way of dealing with this sort of thing is to work internally in seconds-since-epoch and then convert to timezones only when actually outputting data. seconds-since-epoch identifies a particular instant in time unambiguously, regardless of what timezone you are in, so it's much easier to work with that. I assumed that since _autocast() was converting to an integer, it was meant to be converting seconds-since-epoch since that's what all the time functions expect to see and it's the most common integer representation of time around..
What do you mean by "convert your local time to UTC before comparing"? If you're dealing in seconds-since-epoch values, that's independent of timezone already, you shouldn't need to do any conversion at all.
Note that without this change the simple&obvious caching mechanism used in apitest.py just doesn't work with any local timezone other than UTC.
You might want to have a dig around in 'pydoc time', it has a good summary of the different representations.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2007.12.23 13:09:00 -
[17]
Originally by: Invisible Hand Edited by: Invisible Hand on 22/12/2007 12:52:01 Note that without this change the simple&obvious caching mechanism used in apitest.py just doesn't work with any local timezone other than UTC.
Actually, it works fine since im using the server times and calculate seconds-til-expiry and add it to local time. Have you actually tried it?
Anyway, you have some valid points, I'll change the thing to use timegm().
_
Got Item? | Ship? | Python EVE API? |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2007.12.23 13:32:00 -
[18]
Edited by: Entity on 23/12/2007 13:34:01
Originally by: Elandra Tenari Thanks for writing this, it's proving very useful.
One minor bug I found whilst processing KillLogs is that the raw Element for the Victim has no attributes. So I changed the if self.container._isrow: section of the tag_end function to pick up attributes on single elements.
My updated version here.
Cheers.
v 1.0.4 available for download (see top post) _
Got Item? | Ship? | Python EVE API? |

Invisible Hand
|
Posted - 2007.12.24 01:43:00 -
[19]
Originally by: Entity
Originally by: Invisible Hand Edited by: Invisible Hand on 22/12/2007 12:52:01 Note that without this change the simple&obvious caching mechanism used in apitest.py just doesn't work with any local timezone other than UTC.
Actually, it works fine since im using the server times and calculate seconds-til-expiry and add it to local time. Have you actually tried it?
Oh, you're right, I grabbed the retrieve half of the caching mechanism for my own code and didn't see the store half that adjusted the time.
Anyway, thanks for changing this 
|

Lake
The Praxis Initiative
|
Posted - 2008.01.10 07:43:00 -
[20]
Too useful to be sitting down here on page 4. -- eve-mail.net beta (thread) Instant Messaging and E-mail for EVE players |
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.02.03 23:31:00 -
[21]
1.0.5 now available. see original post. _
Got Item? | EVE API? |

Durente Galaica
Amarr Fortunate Few
|
Posted - 2008.03.04 21:12:00 -
[22]
I really like this wrapper, and Entity's comments are great for quick and meaningful interpretation. But if you're like me, you will stop working on a project for a few weeks and forget what certain classes and methods do. Then you must dig through the source code, to find the commented section.
Thankfully python allows you to modify the __doc__ file, just by the way you comment! Just take Entity's current comments and change them so slightly to produce the desired result, following this example:
(Pretend the .......'s are whitespace) >>> class foo(): ....... ''' ... This is how you write multiple ....... ....... line comments. .......''' .......def __init__(self): ....... ....... "This is a one line comment" ..............pass
>>> help(foo) Help on class foo in module __main__:
class foo | This is how you write multiple | line comments. | | Methods defined here: | | __init__(self) | ...... This is a one line comment
>>> help(foo.__init__) Help on method __init__ in module __main__:
__init__(self) unbound __main__.foo method .... This is a one line comment
It's great to see that you continue to support this Entity. Thanks for all the work you have put into this!
|

Demiurgis
|
Posted - 2008.03.06 06:25:00 -
[23]
Edited by: Demiurgis on 06/03/2008 06:25:58 this is really cool, I think I am going to use this in a project for my python class. The teacher wants us to use a few modules, and this could be one of them
will most of this work with a limited API key?
|

Kanmahr
|
Posted - 2008.03.09 11:56:00 -
[24]
Great work. There does however seem to be a problem with the trained to level of a skill. The values the API returns seem to be one over the current level. Currently working around it but would be nice to fix :)
Cheers!!!!
|

Flios Bror
Brotherhood of the Phoenix Free Trade Zone.
|
Posted - 2008.03.28 22:04:00 -
[25]
First of all: thanks for making this library, it makes programming a lot easier. And while reading the source-code of the library I learned new things to do in python. I have a few questions:
- What is the syntax for getting the next page, of for example the WalletJournal. I know it's an exercise for the reader, but I didn't manage to find the documentation for this in the library source-code yet.
- How can I get the date+times for the currentTime and the cachedUntil from a element-object returned from a query?
- Last a more general API-question: when several accounts have access to corporate WalletJournal, is the caching-time for everyone at the same time, or is it for each account seperately?
[None] |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.04.16 01:46:00 -
[26]
Edited by: Entity on 16/04/2008 01:47:35 Hm I should be paying more attention to this thread. Too bad this board doesn't let you "subscribe" to threads.
Anyway...
Originally by: Flios Bror
What is the syntax for getting the next page, of for example the WalletJournal. I know it's an exercise for the reader, but I didn't manage to find the documentation for this in the library source-code yet.
You simply add the appropriate beforeRefID=X (where X is the refID of the last/oldest entry of the last query) to the subsequent query.
Originally by: Flios Bror How can I get the date+times for the currentTime and the cachedUntil from a element-object returned from a query?
the currentTime and cachedUntil are available through the _meta attribute on the result root, like this:
result = api.blablabla() foo = result._meta.currentTime
Originally by: Flios Bror Last a more general API-question: when several accounts have access to corporate WalletJournal, is the caching-time for everyone at the same time, or is it for each account seperately?
Not sure, there's a lot of different caching schemes used :-/
Originally by: Kanmahr Great work. There does however seem to be a problem with the trained to level of a skill. The values the API returns seem to be one over the current level. Currently working around it but would be nice to fix :)
Seeing as this wrapper does not have any code that deals with skill levels, nor have any knowledge of the methods exposed by the server, it's problem CCP would have to fix (if it's still the case) 
Originally by: Demiurgis will most of this work with a limited API key?
Limited keys only give limited access! (who would have guessed?) You can do plenty of fun stuff with limited keys though. Check the API reference
Thanks everyone, for the feedback :) _
Got Item? | EVE API? |

bowindah
|
Posted - 2008.07.05 17:51:00 -
[27]
Nice wrapper.
I am trying to use it with AssetList which returns nested rowsets.
The following works, for asset in result2.assets: self.response.out.write("%s<br/>" % asset)
Sometimes it returns, Row(itemID:271302566,locationID:61000108,typeID:588,quantity:1,flag:4,singleton:1,contents:Rowset(columns=[itemID,typeID,quantity,flag,singleton], rows=3)) whereas other times it returns, Row(itemID:561829276,locationID:61000108,typeID:11489,quantity:1,flag:4,singleton:1,contents:None)
So my question is, how to test and enumerate over the nested Rowset?
|

Chruker
|
Posted - 2008.07.06 23:03:00 -
[28]
*meow*
How can this have been missing my eyes for almost a year... ----- http://games.chruker.dk/eve_online ----- Top wishes: - No daily downtime - Faster training on sisi - Speedup IGB table rendering |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.07.12 11:04:00 -
[29]
Originally by: bowindah Nice wrapper.
I am trying to use it with AssetList which returns nested rowsets.
The following works, for asset in result2.assets: self.response.out.write("%s<br/>" % asset)
Sometimes it returns, Row(itemID:271302566,locationID:61000108,typeID:588,quantity:1,flag:4,singleton:1,contents:Rowset(columns=[itemID,typeID,quantity,flag,singleton], rows=3)) whereas other times it returns, Row(itemID:561829276,locationID:61000108,typeID:11489,quantity:1,flag:4,singleton:1,contents:None)
So my question is, how to test and enumerate over the nested Rowset?
Either use a recursive function to walk the tree, or use the flat list. The flat list is easier to process in most cases. Just do blablabla.AssetList(flat=1)
_
Got Item? | EVE API? |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.07.18 12:02:00 -
[30]
Just uploaded the 1.0.6 release.
Apparently I had forgotten to enable text buffering on the xml parser so it was possible for text content to be cut because it wasn't prepared to handle multiple parts for the same content. Fixed now :)
_
Got Item? | EVE API? |
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.09.23 10:32:00 -
[31]
Anti-Thread-AutoLock bump :)
Also note that while this api module does not seem to be updated when CCP adds new api methods, it will happily work with those. |

Thor Richt
|
Posted - 2008.09.23 23:08:00 -
[32]
Edited by: Thor Richt on 23/09/2008 23:08:33 FYI: I tend to change line 339 (in 1.6) to the following:
raise RuntimeError("Invalid API response: expected 'eveapi', got %s" % name)
During downtimes, and other flakiness on the api server, this reports the error messages coming from their http server. (All I changed was printing the value "if name != 'eveapi'".) |

Carlos Adan
|
Posted - 2008.10.27 22:06:00 -
[33]
Hi there. Is there any easy way to get transaction data from a given TransactionID to today?
Sry, but i am really new to the API stuff.
|

Ambo
State Protectorate
|
Posted - 2008.10.27 23:13:00 -
[34]
Fraid not, you can only go back a max of 1000 transactions or 1 week if you have more than 1000 transactions in a week. |

Carlos Adan
|
Posted - 2008.10.27 23:58:00 -
[35]
Hi. Thanks, but thats not the problem. Lets say i used my script to write the sales data 3 days ago, now i want to add the new data, but i want the iteration to start at the point i did the last check, not the beginning of the list.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.11.13 16:52:00 -
[36]
There is currently a problem getting the character sheet. The rowset containing the certificates is missing a required attribute (columns). This is not an eveapi.py bug. _
Got Item? | EVE API? |

Dragonaire
Caldari Corax.
|
Posted - 2008.11.13 21:45:00 -
[37]
I'd say counting on have a columns field is a bug myself ;) There has been/are still other APIs that don't have it. Without a formal DTD or something from CCP you can't really call it wrong for it not to be there. -- Finds camping stations from the inside much easier. Been known to write some PHP code for API from time to time too. |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.11.14 01:03:00 -
[38]
Originally by: Dragonaire I'd say counting on have a columns field is a bug myself ;) There has been/are still other APIs that don't have it. Without a formal DTD or something from CCP you can't really call it wrong for it not to be there.
Uneducated response is uneducated.
What if you get an empty set but still want the columns to display in a list in an application?
Not to mention I helped Garthagk out back when he was designing this thing, so I think I am more than qualified to call it wrong for it not to be there.
_
Got Item? | EVE API? |

Dragonaire
Caldari Corax.
|
Posted - 2008.11.14 03:01:00 -
[39]
Don't think the flaming was called for and if you were so involved then why didn't you make a DTD or XSD and release it? That would have not only help all the third party developers but also the people that followed you when adding new stuff to API. As far as using the columns stuff to title page columns I don't do that because that would be mixing model and view which is usually considered bad form in MVC and doesn't let you have as much control over what fields you might want to show the users.
Next time you might try explain why you think it's a bug not attack someone for pointing out what sounds like a false assumption or statement to them for you to be making. -- Finds camping stations from the inside much easier. Been known to write some PHP code for API from time to time too. |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.11.14 12:38:00 -
[40]
Originally by: Dragonaire Don't think the flaming was called for
Heh, you call that flaming already? You're essentially considering my lib bugged and I can't make a counter comment? Lighten up 
Originally by: Dragonaire and if you were so involved then why didn't you make a DTD or XSD and release it? That would have not only help all the third party developers but also the people that followed you when adding new stuff to API.
There were limits to my involvement, obviously. It was just discussed in an IRC channel with a few other people. DTD/XSD would have been nice, yes.
Originally by: Dragonaire As far as using the columns stuff to title page columns I don't do that because that would be mixing model and view which is usually considered bad form in MVC and doesn't let you have as much control over what fields you might want to show the users.
Sure. I just took a random example. There are plenty of reasons for wanting to know the columns before the actual data comes up anyway.
Originally by: Dragonaire Next time you might try explain why you think it's a bug not attack someone for pointing out what sounds like a false assumption or statement to them for you to be making.
Seriously though. Even ignoring all that, there is still the fact that every single other rowset tag has the columns attribute, so I'd take the bet it's a bug any day.
|
|

Dragonaire
Caldari Corax.
|
Posted - 2008.11.14 13:19:00 -
[41]
No problem Entity guess for my part the 'Uneducated response is uneducated.' comment just struck a nerve with me 
I won't disagree that since it has been the policy in the past for them to include a columns attribute on rowsets then they really should be here as well. I just never have because they do from time to time seem to forget them at least when first releasing new APIs and I didn't want that breaking what I was doing I've made assumptions like that on other things I thought I know before about the API and had it bite me  -- Finds camping stations from the inside much easier. Been known to write some PHP code for API from time to time too. |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.11.14 15:10:00 -
[42]
Originally by: Dragonaire No problem Entity guess for my part the 'Uneducated response is uneducated.' comment just struck a nerve with me 
Sorry =^.^=
Anyway, there's some merit in working around this issue, and it was a simple workaround, so I've updated the module (see OP).
# Version: 1.0.7 - 14 November 2008 # - Added workaround for rowsets that are missing the (required!) columns # attribute. If missing, it will use the columns found in the first row. # Note that this is will still break when expecting columns, if the rowset # is empty [Flux/Entity] #
|

Chop Shop
|
Posted - 2008.11.21 21:28:00 -
[43]
Hello Entity,
I'm just fooling around with the python and it seems there is more problems than unhandled exceptions. 
Quote:
# Now use the Get() method to get a row directly. # Assumes ISD alliance exists. If it doesn't, we probably have bigger # problems than the unhandled exception here -_- print alliances_by_ticker.Get("ISD")
# You may specify a default to return in case the row wasn't found: print alliances_by_ticker.Get("123456", 42)
# If no default was specified and you try to look up a key that does not # exist, an appropriate exception will be raised: try: print alliances_by_ticker.Get("123456") except KeyError: print "This concludes example 5"
..and I guess the failsafe? of 123456 is something I would edit to be an existing alliance ticker? like BOB or OHGOD ?
Below is the python shell output I got -- I assume the output may be academic to you but I am working with the API and python for the first time.
Having said that, what is the significance of the ",42" above? Just wondering if I need to fiddle with that if I chance the alliance ticker..
Quote:
Traceback (most recent call last): File "Q:\eve_api_py_107\apitest.py", line 239, in <module> print alliances_by_ticker.Get("ISD") File "Q:\eve_api_py_107\eveapi.py", line 614, in Get raise KeyError, key KeyError: 'ISD' >>>
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2008.11.22 12:46:00 -
[44]
Originally by: Chop Shop
Quote:
# You may specify a default to return in case the row wasn't found: print alliances_by_ticker.Get("123456", 42)
# If no default was specified and you try to look up a key that does not # exist, an appropriate exception will be raised: try: print alliances_by_ticker.Get("123456") except KeyError: print "This concludes example 5"
..and I guess the failsafe? of 123456 is something I would edit to be an existing alliance ticker? like BOB or OHGOD ?
Below is the python shell output I got -- I assume the output may be academic to you but I am working with the API and python for the first time.
Having said that, what is the significance of the ",42" above? Just wondering if I need to fiddle with that if I chance the alliance ticker..
The second argument to Get() is .. well, like the example says already, the default. It just provides you with an interface almost identical to the get() method on dictionaries. I just used the alliances thing here to demonstrate it, but it might as well have been this:
usernameByID = {1: "john", 2: "mark"} x = 3 name = usernameByID.get(x, "guest")
versus
usernameByID = {1: "john", 2: "mark"} x = 3 try: name = usernameByID[x] except KeyError: name = "guest"
Of course if one doesn't handle the exception, like what happens here:
Originally by: Chop Shop
Quote:
Traceback (most recent call last): File "Q:\eve_api_py_107\apitest.py", line 239, in <module> print alliances_by_ticker.Get("ISD") File "Q:\eve_api_py_107\eveapi.py", line 614, in Get raise KeyError, key KeyError: 'ISD' >>>
Then, well... Let's just say the example isn't supposed to do that.
The problem here is that CCP appears to have the habit of letting the ISD alliance expire  I used ISD in the example assuming it to be a permanent entry in the database, but it isn't :D
Just change it to something that exists to fix that 
_
Got Item? | EVE API? |

Chop Shop
|
Posted - 2008.11.23 06:28:00 -
[45]
Thank you for the explanations. Beyond the call of duty, I appreciate it.. and the API wrapper. It'll surly help me after I try my hand at some python CGI and other stuff to get some experience under my belt.
Ah, ISD is a CCP alliance. I was thinking that was one that you had interest in. Glad to hear that it wasn't your alliance that disappeared.
|

graalman
|
Posted - 2009.01.06 18:41:00 -
[46]
Entity, first I would like to thank you for your work, I have been using it for around a year now.
here is two small changes over the latest version (1.0.7) - python 2.6 exception.message depreciation - proxy support for eveapi (for people connecting via a proxy)
the changes are done to be minimal impact on the code - i have been using this hack for a year, but thought would be nice to share it the proxy support is done via a module variable so that the client code needs to set it up i.e.
client.py:
import eveapi eveapi.proxy=('my.proxy.net',8000) (the default is set to None, for backwards compatibility) then same as before....
Changes: (you can remove the comment lines I added) 2 places. ###################################### A) Lines 70 - 80:
from calendar import timegm
#----------------PROXY-MODIF-START- proxy=None #default behaviour, change this module variable to (my.proxy.net,8088) for usage via a proxy #----------------PROXY-MODIF-END---
#-----------------------------------------------------------------------------
class Error(StandardError): def __init__(self, code, message): self.code = code #----------------Exception.message depreciation py2.6-fix-START self.args = (message.rstrip("."),) #----------------Exception.message depreciation py2.6-fix-END
#################################### B) Lines 222-239 (previously 217-224):
if response is None: #----------------PROXY-MODIF-START- if proxy==None: http = httplib.HTTPConnection(self._host) else: http = httplib.HTTPConnection(proxy[0],proxy[1]) if kw: if proxy==None: http.request("POST", path, urllib.urlencode(kw), {"Content-type": "application/x-www-form-urlencoded"}) else: http.request("POST", 'http://'+self._host+path, urllib.urlencode(kw), {"Content-type": "application/x-www-form-urlencoded"}) else: if proxy==None: http.request("GET", path) else: http.request("GET", 'http://'+self._host+path) #----------------PROXY-MODIF-END--- response = http.getresponse()
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.01.15 23:03:00 -
[47]
Version 1.1.0 is now available! (see OP for location)
# Version: 1.1.0 - 15 Januari 2009 # - Added Select() method to Rowset class. Using it avoids the creation of # temporary row instances, speeding up iteration considerably. # - Added ParseXML() function, which can be passed arbitrary API XML file or # string objects. # - Added support for proxy servers. A proxy can be specified globally or # per api connection instance. [suggestion by graalman] # - Some minor refactoring. # - Fixed deprecation warning when using Python 2.6.
the apitest.py test script has also been updated to show the use of Select()
_
Got Item? | EVE API? |

Pasion Helada
SPANI T o r m e n t u m
|
Posted - 2009.03.16 13:04:00 -
[48]
Hi,
Any chance for an update to use the new SkillQueue?
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.03.21 16:54:00 -
[49]
Skillqueue works fine as far as I know. It's just CCP using the incorrect XML formatting for the elements (should use rowsets), so I'm kind of waiting for CCP to correct this (I've made them aware of the problem), as fixing this in the api module would require making it aware of the SkillQueue method, which completely goes against the "anonymous" nature of the design.
As a workaround you can check whether there's just 1 skill element or a rowset. It's only 2-3 lines of code ;-)
_
Got Item? | EVE API? |

Lumy
Minmatar eXceed Inc. Minor Threat.
|
Posted - 2009.03.21 17:13:00 -
[50]
Originally by: Entity Skillqueue works fine as far as I know. It's just CCP using the incorrect XML formatting for the elements (should use rowsets), so I'm kind of waiting for CCP to correct this (I've made them aware of the problem), as fixing this in the api module would require making it aware of the SkillQueue method, which completely goes against the "anonymous" nature of the design.
As a workaround you can check whether there's just 1 skill element or a rowset. It's only 2-3 lines of code ;-)
Last time I checked char/SkillQueue was using "correct" format. It should be working now.
Joomla! in EVE - IGB compatible CMS. |
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.03.23 14:49:00 -
[51]
They actually fixed it? omg  _
Got Item? | EVE API? |

Dragonaire
Caldari Corax. Sex Drugs And Rock'N'Roll
|
Posted - 2009.03.23 21:28:00 -
[52]
Probably was by mistake I'm sure they'll break it again  -- Finds camping stations from the inside much easier. Designer of Yapeal for Eve API.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.05.31 21:14:00 -
[53]
Well, it's been a few months and it's still working fine!
(anti thread lock bump)
Oh, anyone using Python 3 btw? I might consider making a version for that. _
Got Item? | EVE API? |

Draeath
|
Posted - 2009.06.21 11:43:00 -
[54]
Just wanted to swing by and say thanks! This wrapper is just the ticket! |

Amerilia
|
Posted - 2009.07.16 16:33:00 -
[55]
Originally by: Entity Well, it's been a few months and it's still working fine!
(anti thread lock bump)
Oh, anyone using Python 3 btw? I might consider making a version for that.
Yes please
|

Ilyk Halibut
The Drekla Consortium Southern Cross Alliance
|
Posted - 2009.07.19 17:24:00 -
[56]
Any chance we could get a Google Code project set up for this?
|

Alyzza
|
Posted - 2009.07.26 12:26:00 -
[57]
Is it possible to retrieve the corporation sheet through the api without authenticating? The corp sheet should be available without limited key.
>>> api.corp.CorporationSheet() Error: Must provide userID parameter for authentication
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.07.28 00:47:00 -
[58]
Originally by: Alyzza Is it possible to retrieve the corporation sheet through the api without authenticating? The corp sheet should be available without limited key.
>>> api.corp.CorporationSheet() Error: Must provide userID parameter for authentication
Nope. blame CCP :P _
Got Item? | EVE API? |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.07.28 00:48:00 -
[59]
Originally by: Ilyk Halibut Any chance we could get a Google Code project set up for this?
Not sure if there's a point for such a tiny snippet of code.
I'll consider it for next version (if/when that comes), though. Maybe add a setup.py etc. _
Got Item? | EVE API? |

Alyzza
|
Posted - 2009.07.28 14:31:00 -
[60]
Originally by: Entity
Nope. blame CCP :P
The logic behind your code is so lisp-esque i was aroused. Obviously, there should be a /eve/CorporationSheet.xml.aspx. Blaming CCP for this ofc. Nothing like hard-coded apikeys to do a simple corporation query ;)
|
|

Alyzza
Ono-Sendai Limited
|
Posted - 2009.08.12 21:39:00 -
[61]
There seems to be a bit of a "bug" when corporations have bytes in their description which can't be encoded as unicode. Case and point: http://api.eve-online.com/corp/CorporationSheet.xml.aspx?corporationID=639241770
When retrieveing that, I get an UnicodeEncodeError. Stacktrace: File "/home/kriberg/kode/leve/leve/../leve/core/eveapi.py" in __call__ 228. return self._root(self._path, **kw) File "/home/kriberg/kode/leve/leve/../leve/core/eveapi.py" in __call__ 301. return _ParseXML(response, True, store and (lambda obj: cache.store(self._host, path, kw, response, obj))) File "/home/kriberg/kode/leve/leve/../leve/core/eveapi.py" in _ParseXML 156. obj = _Parser().Parse(response, False) File "/home/kriberg/kode/leve/leve/../leve/core/eveapi.py" in Parse 348. p.Parse(data, True)
Don't know if there's a sane way to handle it either. In this case, I tried enclosing it in a try/except, but the exception probably comes when parsing the entire response. Would be nice if I didn't need to discard the entire response. Perhaps it could per default set the current property to 'unicode error' or something.
|

Amerilia
|
Posted - 2009.08.17 16:12:00 -
[62]
I have modified it to work under Python 3.1 and so far it appears to work. The source is here: http://paste.org/pastebin/view/9838
|

SPACE L0RD
Gallente
|
Posted - 2009.09.11 02:15:00 -
[63]
I get the following when running the apitest.py script on my system (Mac OSX 10.6.1). Using Python 2.6.1.
------------------
EXAMPLE 6: CACHING DATA
[1] /eve/SkillTree.xml.aspx: retrieving from disk [1] /eve/SkillTree.xml.aspx: returning cached document [2] /eve/SkillTree.xml.aspx: returning cached document
EXAMPLE 7: TRANSACTION DATA (and doing more nifty stuff with rowsets)
[3] /char/WalletJournal.xml.aspx: retrieving from disk [3] /char/WalletJournal.xml.aspx: returning cached document You paid a 3923822.47 ISK transaction tax since Sat Jun 13 19:52:00 2009 [4] /char/WalletTransactions.xml.aspx: retrieving from disk [4] /char/WalletTransactions.xml.aspx: returning cached document Traceback (most recent call last): File "apitest.py", line 406, in <module> for row in soldTx.GroupedBy("typeName")[typeName]: File "/Users/bart/Development/Python/eveapi.py", line 766, in __getitem__ return Rowset(self._cols, self._items[i]) KeyError: 'Expanded Cargohold II'
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.09.13 13:41:00 -
[64]
Originally by: SPACE L0RD
KeyError: 'Expanded Cargohold II'
Uh yeah, you're supposed to fill in something you sold instead of Expander IIs ;)
_
Got Item? | EVE API? |

Xyfu
Minmatar The Nietzian Way
|
Posted - 2009.10.03 02:45:00 -
[65]
for i in chars.characters: if charnom == i.name: charID = i.characterID break
charnom is user input, and chars is auth.account.Characters(). For some reason, charnom == i.name never evaluates true. Halp plix? _____ ^ That is a sig line. It should be there without me having to put one in.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.10.03 02:47:00 -
[66]
Originally by: Xyfu
for i in chars.characters: if charnom == i.name: charID = i.characterID break
charnom is user input, and chars is auth.account.Characters(). For some reason, charnom == i.name never evaluates true. Halp plix?
It is case sensitive, so that might be it ;) _
Got Item? | EVE API? |

Xyfu
Minmatar The Nietzian Way
|
Posted - 2009.10.03 03:03:00 -
[67]
Originally by: Entity
Originally by: Xyfu
for i in chars.characters: if charnom == i.name: charID = i.characterID break
charnom is user input, and chars is auth.account.Characters(). For some reason, charnom == i.name never evaluates true. Halp plix?
It is case sensitive, so that might be it ;)
Huh? Which bit? >: _____ ^ That is a sig line. It should be there without me having to put one in.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.10.03 03:06:00 -
[68]
Originally by: Xyfu
Originally by: Entity It is case sensitive, so that might be it ;)
Huh? Which bit? >:
Your name?  Either fix charnom to spell your name with the correct case, or just do if charnom.lower() == i.name.lower().
_
Got Item? | EVE API? |

Xyfu
Minmatar The Nietzian Way
|
Posted - 2009.10.03 03:10:00 -
[69]
Originally by: Entity
Your name?  Either fix charnom to spell your name with the correct case, or just do if charnom.lower() == i.name.lower().
Oh right, yeah, I know it's case sensitive, I was wary of that. With some print statements about, I had a bit of a promble.
Please select the CEO from the above list: Xyfu <type 'str'> <type 'unicode'> Xyfu Xyfu Xyfu
Xyfu Select a CEO blah blah blah:
The print statement lists: input type, i.name type, input, i.name, str(i.name). Also tried messing around with str(...) and unicode(...)s in the if, but to no avail. _____ ^ That is a sig line. It should be there without me having to put one in.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.10.03 03:22:00 -
[70]
Edited by: Entity on 03/10/2009 03:21:51 yeah well... check the example here. that has the same construct you're using and that works fine, so you must be doing something wonky with your input :P
_
Got Item? | EVE API? |
|

Xyfu
Minmatar The Nietzian Way
|
Posted - 2009.10.03 17:48:00 -
[71]
Originally by: Entity Edited by: Entity on 03/10/2009 03:21:51 yeah well... check the example here. that has the same construct you're using and that works fine, so you must be doing something wonky with your input :P
Ok, I've no idea why, but my break wasn't working properly, causing the while True to keep going, even though I'd gotten my charID. Oh well.
Love your module, by the way, if I had any items you didn't, I'd happily donate them. _____ ^ That is a sig line. It should be there without me having to put one in.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2009.12.11 15:38:00 -
[72]
I assume there's no problems with the library and the new API methods then? :) _
Got Item? | EVE API? | Cache? |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.01.10 16:21:00 -
[73]
Version 1.1.1 released (see OP).
This fixes corp.MemberSecurity (which did not properly return all data on members)
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.04.02 12:36:00 -
[74]
The usual anti-thread-expire bump! :) |

medecau
Gallente Super Bock Preta
|
Posted - 2010.04.24 08:54:00 -
[75]
Just created a git repository for the eveapi.
|

Meldgaard
Agony Unleashed Agony Empire
|
Posted - 2010.06.30 22:39:00 -
[76]
Edited by: Meldgaard on 30/06/2010 22:47:08 Edited by: Meldgaard on 30/06/2010 22:42:58
Originally by: Alyzza There seems to be a bit of a "bug" when corporations have bytes in their description which can't be encoded as unicode.
I have the same error just with the ccp event in char/UpcomingCalendarEvents.xml.aspx: Row(eventID:37679,ownerID:793028819,ownerName:Agony Unleashed,eventDate:1277985600,eventTitle:api test ignore,duration:180,importance:0,response:Undecided,eventText:test1 ) Traceback (most recent call last): File "./eveapibug.py", line 28, in <module> print event File "/home/rasmusm/local/src/evegate2ical/eveapi.py", line 557, in __str__ return "Row(" + ','.join(map(lambda k, v: "%s:%s" % (str(k), str(v)), self._cols, self._row)) + ")" File "/home/rasmusm/local/src/evegate2ical/eveapi.py", line 557, in <lambda> return "Row(" + ','.join(map(lambda k, v: "%s:%s" % (str(k), str(v)), self._cols, self._row)) + ")" UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 178: ordinal not in range(128)
this test code (and test xml on my test server) gives the error:
EDIT: arg its a bad forum, you can get the file here: http://eveapi.rasmusm.dk/eveapibug.py
|

Meldgaard
Agony Unleashed Agony Empire
|
Posted - 2010.06.30 23:14:00 -
[77]
And i fund the bug: Eve api is utf-8 and the parser is using unicode strings.
Here is a quick and dirty fix: http://eveapi.rasmusm.dk/eveapi-utf-8.patch
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.07.01 02:04:00 -
[78]
Edited by: Entity on 01/07/2010 02:13:38
Originally by: Meldgaard And i fund the bug: Eve api is utf-8 and the parser is using unicode strings.
Here is a quick and dirty fix: http://eveapi.rasmusm.dk/eveapi-utf-8.patch
Hm?. I'm not quite sure that is actually a bug. See, it's up to the implementor to output with the correct encoding for the target (in your case a console window). The objects returned by the parser are supposed to be regular/unicode strings. If you encode them they technically stop being strings and start being binary data that just so happens to be some representation of said string.
Edit: Oh and welcome to the headache that is python and encodings. _
Got Item? | EVE API? | Cache? |

Meldgaard
Agony Unleashed Agony Empire
|
Posted - 2010.07.01 09:47:00 -
[79]
Originally by: Entity Edited by: Entity on 01/07/2010 02:13:38
Originally by: Meldgaard And i fund the bug: Eve api is utf-8 and the parser is using unicode strings.
Here is a quick and dirty fix: http://eveapi.rasmusm.dk/eveapi-utf-8.patch
Hm?. I'm not quite sure that is actually a bug. See, it's up to the implementor to output with the correct encoding for the target (in your case a console window). The objects returned by the parser are supposed to be regular/unicode strings. If you encode them they technically stop being strings and start being binary data that just so happens to be some representation of said string.
Edit: Oh and welcome to the headache that is python and encodings.
The problem is (as i understand it, because yes this is my first time with utf-8 in python) that the eveapi are returning strings in uft-8, but in _Parser.__str__ you are calling str() on the variable holding the utf-8 string, this will cast an exception if the utf-8 string do include char outside of unicode (like in the description of the ccp created event about the ore primae)
PS. I forgot to say thank you for making this nice api wrapper, other than this but (and i blame utf-8) its a pleasure to be working with.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.07.01 23:52:00 -
[80]
Edited by: Entity on 01/07/2010 23:55:20
Originally by: Meldgaard The problem is (as i understand it, because yes this is my first time with utf-8 in python) that the eveapi are returning strings in uft-8, but in _Parser.__str__ you are calling str() on the variable holding the utf-8 string, this will cast an exception if the utf-8 string do include char outside of unicode (like in the description of the ccp created event about the ore primae)
Ah, well there -is- a bug but it's actually in the __str__ and not in the autocast function. To be honest the Row string representation was not really meant to be used for anything other than debugging stuff, but of course that has to work properly as well. I've fixed it and put the new version up on git.
The change doesn't make your code run as is though. You just can't print unicode stuff without providing an encoding for it. So, if you get the new eveapi.py, you still have to do this to actually output it to a console window:
print unicode(event).encode("utf8") (unicode characters that have no ascii mapping will be unreadable though, as they'll be ... encoded :).
_
Got Item? | EVE API? | Cache? |
|

Nuran DeSiad
Gallente Fleet of the Damned Ta8ula Rasa
|
Posted - 2010.08.27 14:29:00 -
[81]
Hi,
I'm quite new with the whole API thing...I wanted to start out with the Python eveapi to write some scripts for my own use...Python is also new to me...so please bear with me if I talk rubbish :)
My problem:
When I try to run the 'example.py' , I get the following errors:
./example.py: line 3: watchList: command not found ./example.py: line 4: [1234567,: command not found ./example.py: line 6: ]: command not found ./example.py: line 8: syntax error near unexpected token `(' ./example.py: line 8: `api = eveapi.EVEAPIConnection()'\
I've added the userid and api key and the name to the script as described, and placed the eveapi.py in the site-packages directory. The python version I use is 2.6.4 on a Fedora 13 host. Anyone a tip ?
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.08.27 22:22:00 -
[82]
Originally by: Nuran DeSiad Hi,
I'm quite new with the whole API thing...I wanted to start out with the Python eveapi to write some scripts for my own use...Python is also new to me...so please bear with me if I talk rubbish :)
My problem:
When I try to run the 'example.py' , I get the following errors:
./example.py: line 3: watchList: command not found ./example.py: line 4: [1234567,: command not found ./example.py: line 6: ]: command not found ./example.py: line 8: syntax error near unexpected token `(' ./example.py: line 8: `api = eveapi.EVEAPIConnection()'\
I've added the userid and api key and the name to the script as described, and placed the eveapi.py in the site-packages directory. The python version I use is 2.6.4 on a Fedora 13 host. Anyone a tip ?
Try running it with python and not bash ;)
_
Got Item? | EVE API? | Cache? |

Nuran DeSiad
Gallente Fleet of the Damned Ta8ula Rasa
|
Posted - 2010.08.28 20:48:00 -
[83]
Hi Entity,
Thanks...I was so fixed on this that I overlooked it...Anyway...when I run 'python example.py', it chokes again, and returns this message:
python example.py Traceback (most recent call last): File "example.py", line 1, in <module> import eveapi File "/home/andy/Projects/eveapi.py", line 7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ^ SyntaxError: invalid syntax
cheers, Nuran
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.08.29 00:41:00 -
[84]
Edited by: Entity on 29/08/2010 00:41:42
Originally by: Nuran DeSiad Hi Entity,
Thanks...I was so fixed on this that I overlooked it...Anyway...when I run 'python example.py', it chokes again, and returns this message:
python example.py Traceback (most recent call last): File "example.py", line 1, in <module> import eveapi File "/home/andy/Projects/eveapi.py", line 7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ^ SyntaxError: invalid syntax
cheers, Nuran
Try copying the api module as text instead of html.
(are we going to keep doing this?) _
Got Item? | EVE API? | Cache? |

Nuran DeSiad
Gallente Fleet of the Damned Ta8ula Rasa
|
Posted - 2010.08.30 08:16:00 -
[85]
Thnx Entity, it works ok now...sorry for my clumsy questions...I should've looked a little further myself...
Anyway, thanks again, I'm off to play with the api now ! :)
cheers, Nuran
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.11.08 02:17:00 -
[86]
1.1.3 available. Fixes char/MailBodies. _
Got Item? | EVE API? | Cache? |

XennoX268
THORN Syndicate Controlled Chaos
|
Posted - 2010.11.08 08:36:00 -
[87]
I'm getting hit by the following error when trying to use the test script.
---
EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "C:\Users\me\Desktop\EVE API Project\apitest2.py", line 79, in <module> result2 = auth.account.Characters() File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 240, in __call__ return self._root(self._path, **kw) File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 325, in __call__ return _ParseXML(response, True, store and (lambda obj: cache.store(self._host, path, kw, response, obj))) File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 176, in _ParseXML raise Error(error.code, error.data) Error: Authentication failure
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.11.09 00:20:00 -
[88]
Originally by: XennoX268 I'm getting hit by the following error when trying to use the test script.
---
EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 176, in _ParseXML raise Error(error.code, error.data) Error: Authentication failure
Reading line 17 might help.  _
Got Item? | EVE API? | Cache? |

XennoX268
THORN Syndicate Controlled Chaos
|
Posted - 2010.11.09 09:07:00 -
[89]
Originally by: Entity
Originally by: XennoX268 I'm getting hit by the following error when trying to use the test script.
---
EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 176, in _ParseXML raise Error(error.code, error.data) Error: Authentication failure
Reading line 17 might help. 
Except, I've put my userID plus full API key into the script, and checked it multiple times.
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.11.09 11:16:00 -
[90]
Originally by: XennoX268
Originally by: Entity
Originally by: XennoX268 I'm getting hit by the following error when trying to use the test script.
---
EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "C:\Users\me\Desktop\EVE API Project\eveapi.py", line 176, in _ParseXML raise Error(error.code, error.data) Error: Authentication failure
Reading line 17 might help. 
Except, I've put my userID plus full API key into the script, and checked it multiple times.
Really, it works fine. I run that script before every release.
The error you get is a server-side response that you only get when there is something wrong with the credentials (or account status, perhaps).
_
Got Item? | EVE API? | Cache? |
|

Pantload
Gallente Handsome Millionaire Playboys Warped Aggression
|
Posted - 2010.11.09 17:42:00 -
[91]
Edited by: Pantload on 10/11/2010 00:48:56 I think I figured it out. Sorry. Thanks.
TUG: The Underpants Gnomes. Buy Corps here
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2010.12.01 10:05:00 -
[92]
1.1.4 now available, which fixes empty CDATA not being handled (e.g. empty mail bodies)
_
Got Item? | EVE API? | Cache? |

Mr Coloredshirt
|
Posted - 2010.12.08 01:29:00 -
[93]
Edited by: Mr Coloredshirt on 08/12/2010 01:29:29 I'm probably being an utter scrub here, but I can't seem to get startDateTime to show anything understandable.
I copied the top part of your example (the import-bit), I (succesfully) authed my account. Now when I run something simple like
membersraw = auth.corp.MemberTracking(characterID=YOUR_CHARID)
for member in membersraw.members: print member.name, member.startDateTime
I get the name properly, but the startDateTime outputs things like 1290793680, when it should be 2010-11-26 17:48:00 (or atleast something like 2010112661748). Color me confused, please help.
|

Catari Taga
Centre Of Attention Middle of Nowhere
|
Posted - 2010.12.08 02:58:00 -
[94]
Originally by: Mr Coloredshirt I get the name properly, but the startDateTime outputs things like 1290793680, when it should be 2010-11-26 17:48:00 (or atleast something like 2010112661748). Color me confused, please help.
http://en.wikipedia.org/wiki/Unix_time --
|

Mr Coloredshirt
Brutor Tribe
|
Posted - 2011.01.26 02:22:00 -
[95]
Originally by: Catari Taga
Originally by: Mr Coloredshirt I get the name properly, but the startDateTime outputs things like 1290793680, when it should be 2010-11-26 17:48:00 (or atleast something like 2010112661748). Color me confused, please help.
http://en.wikipedia.org/wiki/Unix_time
Thanks ♥
New dumbass question of the day: http://wiki.eve-id.net/APIv2_Char_MailBodies_XML The mailbody (what I'm after) is in CDATA and I can't seem to find out how to retrieve it. Any ideas?
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.05.27 13:26:00 -
[96]
New update
# Version: 1.1.6 - 27 May 2011 # - Now supports composite keys for IndexRowsets. # - Fixed calls not working if a path was specified in the root url. _
Got Item? | EVE API? | Cache? |

tantomonta montatanto
|
Posted - 2011.05.28 14:50:00 -
[97]
Originally by: Entity New update
# Version: 1.1.6 - 27 May 2011 # - Now supports composite keys for IndexRowsets. # - Fixed calls not working if a path was specified in the root url.
I've upgraded to that version and I get this error:
Quote: python apitest.py
EXAMPLE 1: GETTING THE ALLIANCE LIST (and showing alliances with 1000 or more members)
Traceback (most recent call last): File "apitest.py", line 46, in <module> result1 = api.eve.AllianceList() File "/usr/lib/python2.6/dist-packages/eveapi.py", line 251, in __call__ return self._root(self._path, **kw) File "/usr/lib/python2.6/dist-packages/eveapi.py", line 306, in __call__ http.request("GET", path) File "/usr/lib/python2.6/httplib.py", line 914, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.6/httplib.py", line 951, in _send_request self.endheaders() File "/usr/lib/python2.6/httplib.py", line 908, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 780, in _send_output self.send(msg) File "/usr/lib/python2.6/httplib.py", line 739, in send self.connect() File "/usr/lib/python2.6/httplib.py", line 1112, in connect sock = socket.create_connection((self.host, self.port), self.timeout) File "/usr/lib/python2.6/socket.py", line 547, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.05.28 18:59:00 -
[98]
Woops my bad. Updated. _
Got Item? | EVE API? | Cache? |

Yinmatook
|
Posted - 2011.06.21 16:53:00 -
[99]
I am starting to play with this on a Mac using python 2.6.6, and the apitest.py is aborting with the following:
EXAMPLE 7: TRANSACTION DATA (and doing more nifty stuff with rowsets)
[3] /char/WalletJournal.xml.aspx: not cached, fetching from server... [3] /char/WalletJournal.xml.aspx: cached (632 seconds) Traceback (most recent call last): File "./apitest.py", line 385, in <module> entriesByRefType = journal.entries.GroupedBy("refTypeID") AttributeError: 'Element' object has no attribute 'entries'
Is this expected, is this because I'm on a mac? I'm just starting to figure out this API stuff, want to build some apps for my corp and I'm sort of lost (I hope that's normal when we start doing this stuff).
Thanks, Yin
|

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.06.21 17:51:00 -
[100]
Originally by: Yinmatook I am starting to play with this on a Mac using python 2.6.6, and the apitest.py is aborting with the following:
EXAMPLE 7: TRANSACTION DATA (and doing more nifty stuff with rowsets)
[3] /char/WalletJournal.xml.aspx: not cached, fetching from server... [3] /char/WalletJournal.xml.aspx: cached (632 seconds) Traceback (most recent call last): File "./apitest.py", line 385, in <module> entriesByRefType = journal.entries.GroupedBy("refTypeID") AttributeError: 'Element' object has no attribute 'entries'
Is this expected, is this because I'm on a mac? I'm just starting to figure out this API stuff, want to build some apps for my corp and I'm sort of lost (I hope that's normal when we start doing this stuff).
Thanks, Yin
Nah. try replacing 'entries' with 'transactions'. I think they just renamed the table :P
_
Got Item? | EVE API? | Cache? |
|

Rakio Oramara
Caldari Caldari State Navy
|
Posted - 2011.07.10 06:59:00 -
[101]
I've run into problems with apitest.py. Wallet accesses bomb out with:
-- EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "apitest.py", line 88, in <module> wallet = auth.char.AccountBalance(characterID=character.characterID) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 252, in __call__ return self._root(self._path, **kw) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 342, in __call__ return _ParseXML(response, True, store and (lambda obj: cache.store(self._host, path, kw, response, obj))) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 188, in _ParseXML raise Error(error.code, error.data) eveapi.Error: Current security level not high enough --
If I comment out the code for example 2, the rest of the examples run okay and give correct data until the next wallet access in example 7 ( journal = me.WalletJournal() ), which quits with the same error as above. Tested with my two accounts, both show identical behavior. Any idea why this happens?
BTW, do you have a printable list of your missing items? This would make it much easier to help you with your holy mission. |

tantomonta montatanto
|
Posted - 2011.07.10 09:53:00 -
[102]
Originally by: Rakio Oramara I've run into problems with apitest.py. Wallet accesses bomb out with:
-- EXAMPLE 2: GETTING WALLET BALANCE OF ALL YOUR CHARACTERS
Traceback (most recent call last): File "apitest.py", line 88, in <module> wallet = auth.char.AccountBalance(characterID=character.characterID) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 252, in __call__ return self._root(self._path, **kw) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 342, in __call__ return _ParseXML(response, True, store and (lambda obj: cache.store(self._host, path, kw, response, obj))) File "G:\Software\Spiele\MMO\Eve Online\Dev_Stuff\eveapi.py", line 188, in _ParseXML raise Error(error.code, error.data) eveapi.Error: Current security level not high enough --
If I comment out the code for example 2, the rest of the examples run okay and give correct data until the next wallet access in example 7 ( journal = me.WalletJournal() ), which quits with the same error as above. Tested with my two accounts, both show identical behavior. Any idea why this happens?
BTW, do you have a printable list of your missing items? This would make it much easier to help you with your holy mission.
Seems you are using Limited API Key. You need Full Key for some queries (http://wiki.eve-id.net/APIv2_Page_Index) |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.09.01 22:06:00 -
[103]
1.1.8 now available.
# Version: 1.1.8 - 1 September 2011 # - fix for inconsistent columns attribute in rowsets. # # Version: 1.1.7 - 1 September 2011 # - auth() method updated to work with the new authentication scheme. _
Got Item? | EVE API? | Cache? |

diabeteman
ICE is Coming to EVE Goonswarm Federation
|
Posted - 2011.09.02 00:05:00 -
[104]
Edited by: diabeteman on 02/09/2011 00:18:03 EDIT: You read my mind!!! You fixed it as I was posting this 
Hello mate,
I've been using evapi for over 2 years now and I must say : YOU ROCK!
I've got bad news though, since last CCP API patch (today in fact) the /corp/AssetList.xml.aspx response has changed and rows now (sometimes) contain a "rawQuantity" attribute (which seems to indicate blueprint copies if the value is -2 (lol))
Here is what it looks like:
And now, the problem. I run this code:
Quote: apiAssets = eveapi.EVEAPIConnection().auth(keyID=myKey, vCode=myCode).corp.AssetList(characterID=myCharID)
and then when I debug the program in eclipse PyDev, I get this when introspecting "apiAssets":
Nice drawing isn't it?
As you can see, there are 2 columns with the same name "contents". The thing is that when you want to access the actual "contents" of a Row, you get the first column value which is an integer (presumably the infamous "rawQuantity" attribute) and there is no way to access the contents.
I don't know exactly if this is a CCP fail (seems like it...) or a bug on your side, but we must do something 
I tried to fix it by myself but it's getting late and I can't keep my eyes open anymore. Could you take a look at it?
---------------
What happened to all the fun in the world? (F. Zappa) |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.09.02 00:31:00 -
[105]
Originally by: diabeteman Edited by: diabeteman on 02/09/2011 00:18:03 EDIT: You read my mind!!! You fixed it as I was posting this 
Hehe. I keep having to clean up after CCP's bugs. Every patch seems to get a new dev assigned to do api stuff, who ends up making the same mistakes as his predecessor(s).
Current CCP fails (HI CCP, ARE YOU READING THIS? :): - There is a space in the columns= attribute in rowsets for MemberSecurity page. - rowsets were not designed for conditional columns like rawQuantity in AssetList. More of those in the same table would render it extremely hard to parse without special-casing. Right now eveapi is context-free and I would like to keep it that way.
Originally by: diabeteman I've been using evapi for over 2 years now and I must say : YOU ROCK!
Why thank you, Sir! _
Got Item? | EVE API? | Cache? |

Johnathan Roark
Caldari The Graduates Morsus Mihi
|
Posted - 2011.09.02 01:17:00 -
[106]
Originally by: Entity
Originally by: diabeteman Edited by: diabeteman on 02/09/2011 00:18:03 EDIT: You read my mind!!! You fixed it as I was posting this 
Hehe. I keep having to clean up after CCP's bugs. Every patch seems to get a new dev assigned to do api stuff, who ends up making the same mistakes as his predecessor(s).
Current CCP fails (HI CCP, ARE YOU READING THIS? :): - There is a space in the columns= attribute in rowsets for MemberSecurity page. - rowsets were not designed for conditional columns like rawQuantity in AssetList. More of those in the same table would render it extremely hard to parse without special-casing. Right now eveapi is context-free and I would like to keep it that way.
Originally by: diabeteman I've been using evapi for over 2 years now and I must say : YOU ROCK!
Why thank you, Sir!
XSD would go along way, it would force them to think about the xml a bit and they could even do a generic one for new apis.
Personally, I hate the characterInfo call because you can get 3 different returns depending on key, plus its in the wrong spot, /eve/ should be for global apis.
EVEVERIFY Recruitment API Verifier |

diabeteman
ICE is Coming to EVE Goonswarm Federation
|
Posted - 2011.09.02 03:04:00 -
[107]
@Entity: With your last update, everything is back to normal! Thanks :)
@Johnatan: I just peeked at your project EVEVERIFY. We should consider sharing some work :) Take a look at ECM when you have some time. ---------------
What happened to all the fun in the world? (F. Zappa)
ECM - EVE Corporation Management |

Entity
X-Factor Industries Synthetic Existence
|
Posted - 2011.09.08 18:14:00 -
[108]
New forums thread: https://forums.eveonline.com/default.aspx?g=posts&t=6504 _
Got Item? | EVE API? | Cache? |
|
|
|
Pages: 1 2 3 4 :: [one page] |