I suppose you had something like
some_var = "foo"
def update_some_var():
some_var = "bar" # actually creates a local variable
instead of
some_var = "foo"
def update_some_var():
global some_var
some_var = "bar" # updates the module-scope variable
Yup! Got it in one

Got the XML parsing working for the girlsx files, so the next thing to do is probably the slave market. So, naturally I've been working on a town map. This is very rough - mainly to get the layout straight in my head

And a few notes on the setting - also very rough:
The city lies in the desert at the intersection of two trade routes. One runs from Crossgate in the North-west and South East towards the Imperial Capital. The second road runs west and south toward the western marches.
The city shelters in the lee of the Great Escarpment, thirty miles of cliff face where some ancient geological fault splits the desert in two.
The city is a magnet for those inventors and technologists who find their way to Mundiga. One of the most influential factions in the city is the Science Guild. The guild was founded by imperial decree many hundreds of years ago. The Science Guild's headquarters is The Great Laboratory, built at the end of the West Road nestled up against the wall of Escarpment itself.
The Guild obtains a generous stipend from the Emperor aimed at furthering the progress of the Technological Arts in Mundiga. Science does not work well, however, in the intensely magical land of Mundiga and the Guild's progress has been limited. It is true however that the presence of the Guild has made Abby's Crossing one of the least magical and most technological settlements in the world. The city is also one of the more dimensionally stable settlements, with comparatively few arrivals from other realms.
The trade roads pass through the center of the city, cutting Abby's crossing into four quarters, named for the four elements of Alchemy. To the west, the Fire Quarter houses the military, the council chambers and many of the city's nobility. To the north, the Water Quarter holds the governor's mansion, as well as temples, and much of the city bureaucracy. The southernmost quarter is associated with Earth and is preoccupied with trade and commerce, as well as the business of making sure the city is kept fed and watered. Easternmost is the Air Quarter. Here you will find the majority of the city's scholars, a well as technologists and artisans, couriers and diviniers
Outside the city walls is the Souk, and huge informal marketplace that gives way to an extended tent city housing the itenerant traders as well as the many inhabitants who cannot find accomodation within the city walls. The Souk is also considered to extend along the sides of the trade roads as they pass through the city with many stalls and traders hawking their wares to passers by.