astuder / lightroom-map-fix

Fixing the Map module in Lightroom Classic
125 stars 17 forks source link

MacOS not able to run the command in terminal #23

Closed Delfinder closed 4 years ago

Delfinder commented 4 years ago

I am stuck with running the commands. I open terminal change into the directory where the 3 lightroom lua files and patchluastr.py are located. Do I need to change something in the Python launcher window?

This is what Terminal does: Names-iMac:desktop name$ cd patch Names-iMac:patch name$ patchluastr.py LocationMapView.lua.bak "client=gme-adobesystems" "key=google API-key" -o LocationMapView.lua -bash: patchluastr.py: command not found Names-iMac:patch name$ patchluastr.py LocationMapView.lua.bak "client=gme-adobesystems" "key=google API-key" -o LocationMapView.lua -bash: patchluastr.py: command not found

How do I run this script? I am lost between python and running the command line.

Thank you all guys for your great work helping people not to waste more money on Adobe!

Untitled

astuder commented 4 years ago

You can try to add python before patchluastr.py: python luapatchstr.py ....

However, if you are not familiar with using command line tools, I strongly recommend you find someone locally to help you. It's not rocket science, but it's quite easy to ruin your installation of LR if you don't know what you are doing.

Delfinder commented 4 years ago

Thank you astuder for your quick response. I appreciate your warning and I understand it. I am not a coder but more than 30 years into computers, so I know what to do when I screw up things - hopefully :-)

After changing it is performing the script but it returns this error message (for all 3 files):

usage: patchluastr.py [-h] [-o OUTPUT] [-s] input find replace patchluastr.py: error: argument input: can't open 'LocationMapView.lua.bak': [Errno 2] No such file or directory: 'LocationMapView.lua.bak' TypeError: unsupported operand type(s) for >>: 'str' and 'int'_

File names should be correct Untitled

astuder commented 4 years ago

Verify that you have Python 3 installed. python -V will output the version. If it says 2.x, try the command python3 instead.

Delfinder commented 4 years ago

Thank you for responding so quickly. I have Python Launcher 3.8 but in the system it is still 2.7.10. Installing a later version seems to be quite a bit complicated as a quick research returned. Do you have any recommendation? I am not sure if I can find someone where I am living (rural Canada) who can work on MacOS

Delfinder commented 4 years ago

Another check returned that: Name-iMac:~ name$ python -V Python 2.7.10 Name-iMac:~ name$ python3 --version Python 3.8.0 Name-iMac:~ name$

astuder commented 4 years ago

In that case, try prefixing the command line with python3. E.g. python3 patchluastr.py ...

Delfinder commented 4 years ago

I did and still returns the same error

usage: patchluastr.py [-h] [-o OUTPUT] [-s] input find replace patchluastr.py: error: argument input: can't open 'LocationMapView.lua.bak': [Errno 2] No such file or directory: 'LocationMapView.lua.bak'

Delfinder commented 4 years ago

Command line is: python3 patchluastr.py LocationMapView.lua.bak "client=gme-adobesystems" "key=xxxxxx" -o LocationMapView.lua

astuder commented 4 years ago

what does ls return?

Delfinder commented 4 years ago

AgReverseGeocodeService.lua.bak.lua LocationMapView.lua.bak.lua Command lines.txt patchluastr.py LocationDebugPanel.lua.bak.lua

astuder commented 4 years ago

looks like you're missing an extra .lua at the end

Delfinder commented 4 years ago

Yes, but it does not show in Finder. Can you please provide terminal command to change file name. Sorry, I am now really difficult.

Untitled

astuder commented 4 years ago

Just type the filenames as shown by ls. Finder may dumb down things for the user.

Delfinder commented 4 years ago

Managed to change it. Now this is the result:

Processing LocationMapView.lua.bak This is not a Lua file.

astuder commented 4 years ago

In that case, you got the wrong files. Back to step 4.

Delfinder commented 4 years ago

You are correct. It worked now. On Mac do I just replace the file by pasting it, as there is no "replace" command in the menu?

Delfinder commented 4 years ago

Sorry, I missed the line under the screenshot. All good. Thank you very much for your wonderful help! Will comment if Map works now.

Delfinder commented 4 years ago

It is WORKING!!! Thank you very much astuder for all your work! The only issue is that the map in Lightroom has quite a latency and it shows for a second "Map offline" before it is showing the map.

astuder commented 4 years ago

Glad you got it working :)