Open charlietomo opened 4 years ago
@charlietomo thank you for your steps, they were helpful. Unfortunately I still get an error message (see below) after following your steps: "no such file or directory exists". I also get a similar /private/var/folders/... error message like the one you mentioned.
Like you I have looked around for alternative applications but have not yet found anything as good as Investoscope. I have kind of given up... 😢 I was hopeful when I stumbled on this updater but it does not seem to work.
Sorry the instructions didn't result in success. It looks like it may "just" be a Python or permissions issue. What OS are you running? I found the online tool Sharesight, which has some nice features but also some missing features for me, and comes with a reasonable annual licensing cost.
Hi @charlietomo I am running 10.15.7. Thanks for pointing out Sharesight. It looks nice (unlike many of the PC port solutions out there). It does seem rather expensive for an application missing features. I also dislike subscription models. However, I shall take a look. For now I am using Investoscope just to login transactions and have the reports. I do miss the updating of stock prices.
Hmm, 10.15.7 is the same as me so it isn't a Big Sur issue. I also dislike subscription models but that is the way things are moving. There are some good features, including sharing with others and weekly email reports showing portfolio performance. I have not found a good way to move long term historical records from Investoscope > Sharesight.
Hi @charlietomo - noted regarding Sharesight, I will explore more closely. Thanks again!
You need to install python3 from home-brew or macports, or from the python website. MacOS only comes with python2. This is why you are running into errors
You need to install python3 from home-brew or macports, or from the python website. MacOS only comes with python2. This is why you are running into errors
Interesting, and apologies I missed this step out. It appears I already have both python@3.8
and python@3.9
as installed via brew and shown from brew list
. They must have been dependencies from something else.
Did changing the reference to python3 to the brew installed version (typically at /usr/local/bin/python3) solve your problem?
Hi @KhaineBOT thank you for your suggestion. I already had Python 3.8 and 3.9 installed on my Mac via Homebrew. When I list the contents of /usr/local/bin/
I see the following:
Can you help guide me on how ensure that the reference to python3 points indeed to the brew installed version? Is it via the .bash_profile? Thank you.
Interesting, and apologies I missed this step out. It appears I already have both
python@3.8
andpython@3.9
as installed via brew and shown frombrew list
.
Hi @charlietomo - me too, when I brew list
I see both python@3.8
and python@3.9
.
In the script file you should make sure the line is the following:
PYTHON="/usr/local/bin/python3"
Hi @KhaineBOT in Investoscope Updater > Show Package Contents > Contents > Resources > Script
I have changed the 3rd line to: PYTHON="/usr/local/bin/python3"
I get the following message:
What is the output of:
which python3
I get /usr/local/bin/python3 on my system where I have installed python3 using brew. You will need to find where your instance of python3 is installed and use that, or look into why brew didn't install python correctly
Hello @KhaineBOT the output of which python3
is:
/usr/local/bin/python3
When I simply type python3
, I get the following output:
Python 3.9.2 (default, Feb 24 2021, 13:30:36) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information.
It seems like python3 was properly installed by brew? Thank you for your help with this.
Your screenshot shows that the path you have entered is usr/local/bin/python3. It should be /usr/local/bin/python3
Hi @KhaineBOT thank you for catching that. I made the necessary changes and tried again. I unfortunately got the following error message:
FileNotFoundError[Errno 2] No such file or directory:`/Users/username/.investoscope...`
/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/6BC5004D-AD73-4C04-8FD8-0BCB526BFF3F/d/Investoscope Updater.app/Contents/Resources/investoscope.py:57: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if process.returncode is not 0:
Traceback (most recent call last):
File "/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/6BC5004D-AD73-4C04-8FD8-0BCB526BFF3F/d/Investoscope Updater.app/Contents/Resources/update.py", line 7, in <module>
import investoscope
File "/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/6BC5004D-AD73-4C04-8FD8-0BCB526BFF3F/d/Investoscope Updater.app/Contents/Resources/investoscope.py", line 23, in <module>
CSV_DOWNLOAD_PATH.mkdir(exist_ok=True)
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1312, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/username/.investoscope/csv_data'
It is complaining that the file does not exist. This is because you have not referenced the correct path in your step 3:
3: Download Investoscope updater and edit line 6 of investoscope.py to include the correct path to the data folder. This was harder to find than expected. I managed to find mine at /Users/[username]/Library/Containers/com.investoscope.Investoscope3/Data/Library/Application Support/Investoscope 3
You need to put your username in the path, rather than [username]. This should be the name you use to login to macOS (which is the name of your home directory). For me, its:
/Users/KhaineBOT/Library/Containers/com.investoscope.Investoscope3/Data/Library/Application Support/Investoscope 3
When I checked line 6 of my investoscope.py the following was already present:
INVESTOSCOPE_DB = "/Users/myusername/Library/Containers/com.investoscope.Investoscope3/Data/Library/Application Support/Investoscope 3"
You edited the wrong variable. You need to change the path, not the db name. Try the following:
INVESTOSCOPE_PATH = "~/Library/Containers/com.investoscope.Investoscope3/Data/Library/Application Support/Investoscope 3/" INVESTOSCOPE_DB = "data4.issqlite"
Thank you @KhaineBOT for pointing that out and apologies for my mistake. Just FYI, in my investoscope.py, INVESTOSCOPE_PATH is on line 5...
Anyway, I made the changes following your guidance, saved the file and tried the updater again. Unfortunately this time I received a different error message:
ModuleNotFoundError: No module named 'requests'
/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/DFBF543A-79AC-45E3-BC3A-89621CC76794/d/Investoscope Updater.app/Contents/Resources/investoscope.py:57: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if process.returncode is not 0:
/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/DFBF543A-79AC-45E3-BC3A-89621CC76794/d/Investoscope Updater.app/Contents/Resources/qapi.py:59: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if len(code_market) is not 2:
Traceback (most recent call last):
File "/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/DFBF543A-79AC-45E3-BC3A-89621CC76794/d/Investoscope Updater.app/Contents/Resources/update.py", line 8, in <module>
import qapi
File "/private/var/folders/th/n3s3wtg507vbvcb1t_wfsn6r0000gn/T/AppTranslocation/DFBF543A-79AC-45E3-BC3A-89621CC76794/d/Investoscope Updater.app/Contents/Resources/qapi.py", line 18, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Thank you for your patience and your help.
You need to install the requests module for python.
On the command line run:
pip3 install requests
@KhaineBOT, that did it! Thank you so much!
Wow, it's wonderful to have Investoscope working again - I have been waiting for years!
Just a final quick question, will Investoscope now update daily / realtime stock prices or do I have to open the updater to update the prices? Once again thank you so much!
You need to run the updater to update the prices. The way it works is it downloads the prices from yahoo finance and then using AppleScript manually updates the prices in investoscope.
I see - thank you for clarifying. So I will then keep the updater close at hand. Thanks again for your help, I greatly appreciate it!
Hi @KhaineBOT, during my recent attempts at updating Investoscope stock quotes via the Investoscope Updater, I get the following messages for each ticker: "'NoneType' object has no attribute 'group'"
(see screenshot).
Although the blue progress bar stays in its initial position, the updater proceeds through all the tickers and provides the same message for each ticker. After a certain amount of time, I presume after all tickers have been checked, it simply quits itself.
I have gone through your previous advice and guidance and everything seems in order.
The only change I have done since 2021 is that I installed Python via pyenv and so I have changed the following from: PYTHON="/usr/local/bin/python3"
to: PYTHON="/Users/username/.pyenv/shims/python"
-- I hope that I did not make any mistake here.
Could you please help with this issue? What can I do to fix this. Thank you in advance.
I get that as well. I haven't looked too much into it, as all of my stock codes still work. I assume it is that yahoo finance does not have any data on the various instruments, or they are for instruments that don't currently work in the updater. For example, I know that indices are broken.
Hi @KhaineBOT thank you for your helpful reply. Yahoo should have info on those instruments as they are popular tickers in the US market and in the past they were updated by the updater. Do you think this has something to do with my deleting Python that was previously installed via brew to Python via pyenv? Thank you.
I just setup a new Macbook Pro, running Catalina 10.15.7 and getting Investoscope 3 and Investoscope Update to work was not as straightforward as I had hoped. Leaving some notes here in case it is useful for someone.
investoscope.py
to include the correct path to the data folder. This was harder to find than expected. I managed to find mine at/Users/[username]/Library/Containers/com.investoscope.Investoscope3/Data/Library/Application Support/Investoscope 3
sudo pip3 install requests
(I did this over a little while and can't remember if there was anything else).script
tousr/bin/python3
which reflects the location of Python3 on Catalina.I am getting a couple of errors and my coding skills are not yet up to fixing them:
and
I also see some of these but this may be linked to instruments
I am testing out some alternatives to Investoscope but nothing is as good yet :-(