Itsallaguess wrote:JMN2 wrote:Itsallaguess wrote:
That's correct, and you should be able to un-install it if required, also completely separate from your other applications.
I get a similar error message [in OpenOffice Windows] but slightly longer, apache won't let me copy paste it.
OK, thanks for that.
I think we'll need to re-visit the code on the LibreOffice/OpenOffice version and see why this might be happening for some people.
Thanks for the feedback, it's most appreciated.
Cheers,
Itsallaguess
Hi - I think the bug is straightforward concerning 'data' in the error message.
FWIW, here's a replacement for createPriceDict() that might be a bit more maintainable and it handles FX as well:
Code: Select all
def createPriceDict(text):
m = re.search(r'.*?\[(.*?)\].*', text)
if not m: return {}
text = m.group(1)
data = {}
while text:
m = re.search(r'.*?{(.*?)\}(.*)', text)
if not m: break
symbolData = m.group(1)
symbol, price, currency = '', '', ''
for element in symbolData.split(','):
element = element.replace('"','')
try:
key,val = element.split(':', 1)
except:
continue
if 'symbol' == key:
symbol = val.replace('=X', '')
continue
if 'regularMarketPrice' == key:
price = val
continue
if 'currency' == key:
currency = val.replace('GBp', 'GBX')
continue
#logger.debug("cpd: %s,%s,%s", symbol,price,currency)
data[symbol] = [price, currency]
text = m.group(2)
return data
Thanks to all who maintain HYPTUSS and the simpleyahooscrape as it's got me starting to build my own macros (finally!).
desmid