Page 1 of 1

HYPTUSS runtime error

Posted: August 2nd, 2022, 10:06 am
by Fluke
Could be me but I'm getting the following message when trying to update the company data sheet using the update button on the libra version. I'm currently using b-p but checked on the latest version too and still getting the error.

You probably just haven't got round to it yet but just so you're aware, b-s doesn't have the latest version of company data eg it's missing Haleon, which is why I was trying to update it.


com.sun.star.uno.RuntimeException: Error during invoking function importDataSheet in module vnd.sun.star.tdoc:/3/Scripts/python/HypTopUp.py (<class 'UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xae in position 2925: ordinal not in range(128)
File "/Applications/LibreOffice.app/Contents/Resources/pythonscript.py", line 915, in invoke
ret = self.func( *args )
File "vnd.sun.star.tdoc:/3/Scripts/python/HypTopUp.py", line 7326, in importDataSheet
File "/Applications/LibreOffice.app/Contents/Resources/../Resources/../Frameworks/LibreOfficePython.framework/Versions/Current/lib/python3.8/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
)

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 10:20 am
by kiloran
It works fine for me, Fluke. Imports the new data in the blink of an eye.

From the error message, I get the feeling that maybe the file is not a plain text file. Go to http://lemonfoolfinancialsoftware.weebl ... op-up.html and click on the company_data_sheet.txt link. This probably opens the text file in your browser (this is OK for me with Chrome and Firefox). From the browser, save the file, ensuring it is .txt and not .html or whatever.

From your HYPTUSS, go to the Company Data Sheet tab, select cell A1 (or select row 1) and click on the macro button. And that should be it.
What OS and browser are you using?

--kiloran

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 10:38 am
by Itsallaguess
kiloran wrote:
Go to http://lemonfoolfinancialsoftware.weebl ... op-up.html and click on the company_data_sheet.txt link.

This probably opens the text file in your browser (this is OK for me with Chrome and Firefox).

From the browser, save the file, ensuring it is .txt and not .html or whatever.


A simpler method might be to right-click the company data-sheet link on the website, and use the 'Save Link As' option to directly save the TXT file to desktop or a local folder.

Cheers,

Itsallaguess

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 10:49 am
by Fluke
MacOS 12.4 / Safari.

I'm selecting the company_data_sheet.txt file straight from the downloads folder unchanged.

I click into cell A6 as I have a couple of custom rows followed by a couple of blank rows. Click the button, get the dialogue box, select the file, click open which deletes everything from the company data sheet along with the error message.

Not sure if this helps or further confuses but I started by adding Haleon as a custom row to my existing version (b-p). Share price updated ok but when I tried to update the forecast yields it fell over when it got to Haleon with the following message:

com.sun.star.uno.RuntimeException: Error during invoking function HypFcstYldPy in module vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py (<class 'UnboundLocalError'>: local variable 'myYield' referenced before assignment
File "/Applications/LibreOffice.app/Contents/Resources/pythonscript.py", line 915, in invoke
ret = self.func( *args )
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2559, in HypFcstYldPy
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2642, in HypFcstYldPy_1
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2839, in getDlData
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2893, in getAicData
)

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 10:57 am
by Fluke
Could be something to do with how I downloaded the file. Don't waste any time in case it's me. I've got to jump on another call, I'll have a fiddle and get back if I can't fix it.

Thanks.

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 11:41 am
by kiloran
Fluke wrote:MacOS 12.4 / Safari.

I'm selecting the company_data_sheet.txt file straight from the downloads folder unchanged.

I click into cell A6 as I have a couple of custom rows followed by a couple of blank rows. Click the button, get the dialogue box, select the file, click open which deletes everything from the company data sheet along with the error message.

Not sure if this helps or further confuses but I started by adding Haleon as a custom row to my existing version (b-p). Share price updated ok but when I tried to update the forecast yields it fell over when it got to Haleon with the following message:

com.sun.star.uno.RuntimeException: Error during invoking function HypFcstYldPy in module vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py (<class 'UnboundLocalError'>: local variable 'myYield' referenced before assignment
File "/Applications/LibreOffice.app/Contents/Resources/pythonscript.py", line 915, in invoke
ret = self.func( *args )
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2559, in HypFcstYldPy
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2642, in HypFcstYldPy_1
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2839, in getDlData
File "vnd.sun.star.tdoc:/1/Scripts/python/HypTopUp.py", line 2893, in getAicData
)

I don't have access to MacOS so I can't check that unfortunately. I just tried version b-s updated with the current company data sheet, and it worked fine with Haleon, correctly reporting the forecast yield as n/a

--kiloran

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 2:00 pm
by Fluke
Well I ended up doing an old fashioned cut and paste from the text file to the data sheet of the latest version (b-s), and the prices and yields updated fine. However for some reason the update macro button just doesn't work for me.

I've lost my instructions on how to insert an image or I'd include a screenshot.

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 3:16 pm
by kiloran
Fluke wrote:Well I ended up doing an old fashioned cut and paste from the text file to the data sheet of the latest version (b-s), and the prices and yields updated fine. However for some reason the update macro button just doesn't work for me.

I've lost my instructions on how to insert an image or I'd include a screenshot.

Glad you got the yields updated OK. Sounds like there is an issue with HYPTUSS on MacOS, I'll have a think about it.

--kiloran

Re: HYPTUSS runtime error

Posted: August 2nd, 2022, 8:08 pm
by Fluke
Thanks Kiloran. I'm pretty sure the same thing happened once before but because I need to update the data sheet so rarely I'd forgotten. I'll make a note for myself in the user guide to do a manual update should the need arise again. Since no one else has posted with a similar problem it could be something peculiar to my setup, I just can't think what.

Re: HYPTUSS runtime error

Posted: August 3rd, 2022, 11:45 am
by kiloran
Fluke wrote:Thanks Kiloran. I'm pretty sure the same thing happened once before but because I need to update the data sheet so rarely I'd forgotten. I'll make a note for myself in the user guide to do a manual update should the need arise again. Since no one else has posted with a similar problem it could be something peculiar to my setup, I just can't think what.

I just tried HYPTUSS version b-s on Ubuntu Linux and got the same failure, so it's not you. Something has changed, I know it used to work. Leave it with me.

--kiloran

Re: HYPTUSS runtime error

Posted: August 3rd, 2022, 12:41 pm
by kiloran
kiloran wrote:
Fluke wrote:Thanks Kiloran. I'm pretty sure the same thing happened once before but because I need to update the data sheet so rarely I'd forgotten. I'll make a note for myself in the user guide to do a manual update should the need arise again. Since no one else has posted with a similar problem it could be something peculiar to my setup, I just can't think what.

I just tried HYPTUSS version b-s on Ubuntu Linux and got the same failure, so it's not you. Something has changed, I know it used to work. Leave it with me.

--kiloran

Cracked it! At least on Ubuntu, and hopefully MacOS also.
The problem was not with HYPTUSS, but with company_data_sheet.txt at http://lemonfoolfinancialsoftware.weebl ... op-up.html

The record for EMDV had an odd character in it, copied and pasted from a web site. This character was handled OK by Windows, but upset the file decoding in Ubuntu. I've corrected this and published a new version of company_data_sheet.txt.

This explains why the HYPTUSS import macro for the company_data_sheet.txt used to work OK..... EMDV was added in March 22, 6 months after the HYPTUSS import macro was added.

Have a play and let me know if this is now OK on MacOS

--kiloran

Re: HYPTUSS runtime error

Posted: August 3rd, 2022, 10:20 pm
by Fluke
kiloran wrote:
kiloran wrote:
Fluke wrote:Thanks Kiloran. I'm pretty sure the same thing happened once before but because I need to update the data sheet so rarely I'd forgotten. I'll make a note for myself in the user guide to do a manual update should the need arise again. Since no one else has posted with a similar problem it could be something peculiar to my setup, I just can't think what.

I just tried HYPTUSS version b-s on Ubuntu Linux and got the same failure, so it's not you. Something has changed, I know it used to work. Leave it with me.

--kiloran

Cracked it! At least on Ubuntu, and hopefully MacOS also.
The problem was not with HYPTUSS, but with company_data_sheet.txt at http://lemonfoolfinancialsoftware.weebl ... op-up.html

The record for EMDV had an odd character in it, copied and pasted from a web site. This character was handled OK by Windows, but upset the file decoding in Ubuntu. I've corrected this and published a new version of company_data_sheet.txt.

This explains why the HYPTUSS import macro for the company_data_sheet.txt used to work OK..... EMDV was added in March 22, 6 months after the HYPTUSS import macro was added.

Have a play and let me know if this is now OK on MacOS

--kiloran


That did it kiloran. Thanks, well deduced :)