Py-iMessenger icon indicating copy to clipboard operation
Py-iMessenger copied to clipboard

Issue when running main.py

Open nmacgregor opened this issue 3 years ago • 10 comments

So I just cloned this repo and installed requirements.txt. When running main.py I am getting the following:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/neilmacgregor/Documents/Work/py-iMessenger/Py-iMessenger/src/backend/manage.py", line 172, in backendRunner
    self.deploymentMode()
  File "/Users/neilmacgregor/Documents/Work/py-iMessenger/Py-iMessenger/src/backend/manage.py", line 146, in deploymentMode
    message = self.database.findCommands()      #The database will return any message which seems like command
  File "/Users/neilmacgregor/Documents/Work/py-iMessenger/Py-iMessenger/src/backend/database/databaseModel.py", line 45, in findCommands
    self.cursor.execute(f"SELECT text, cache_roomnames, service, handle_id, ROWID FROM message WHERE text LIKE '/%' AND ROWID > {self.latestCommand}")
sqlite3.OperationalError: no such column: None

Any ideas?

nmacgregor avatar Feb 07 '23 21:02 nmacgregor

What version of MacOS are you running on? I think with Ventura the location where the messages were saved has been altered.

If this is the case, I am unfortunately not continuing development, but I'm open to seeing PRs.

VarunPatelius avatar Feb 08 '23 02:02 VarunPatelius

Yeah it is on Ventura, but I do have a Mac Mini set up running Monterey if you think it will work on there. I am mostly interested in how it is identifying apple devices. That is all I am really looking into. I do not have an iPhone, and when I use iMessages I notice that when I enter a phone number in a new message that the number will change colors to blue if it is capable of receiving iMessages. I was using SSL proxying over the app to see what it was doing to identify the device, but I wasn't seeing any new traffic when I would enter the number and then wait for it to process.

nmacgregor avatar Feb 08 '23 02:02 nmacgregor

Yep, the code should be able to work on Monterey. Although, I had to create some modifications with sending images and other files due to AppleScript being partially broken with that update.

As for how iMessage is able to determine what numbers support iMessage - I'm not sure. But hopefully this project is able to provide some clarity.

VarunPatelius avatar Feb 08 '23 19:02 VarunPatelius

Hrmm, have the same error message on the Mac Mini running macOS Monterey 12.6.3.

nmacgregor avatar Feb 09 '23 07:02 nmacgregor

Ah yeah, make sure you're running a Rosetta Terminal. Since the project uses PyQt5 it needs the i386 architecture.

Heres a good link on how to set that up: https://www.courier.com/blog/tips-and-tricks-to-setup-your-apple-m1-for-development/

VarunPatelius avatar Feb 09 '23 13:02 VarunPatelius

Isn't Rosetta for allowing Intel based applications to run on Apple silicon? The Mac Mini I am using has an i5 CPU.

nmacgregor avatar Feb 10 '23 21:02 nmacgregor

Ah sorry, I mistook that you were using an M1 machine.

I've just tested the program out on a Base Model 2019 MacBook Pro 13' running Monterey 12.4. I'll try upgrading up to 12.6.3 and seeing if I can replicate the error.

VarunPatelius avatar Feb 11 '23 04:02 VarunPatelius

Ok. Thanks for checking that out!

On Fri, Feb 10, 2023, 8:43 PM Varun Patel @.***> wrote:

Ah sorry, I mistook that you were using an M1 machine.

I've just tested the program out on a Base Model 2019 MacBook Pro 13' running Monterey 12.4. I'll try upgrading up to 12.6.3 and seeing if I can replicate the error.

— Reply to this email directly, view it on GitHub https://github.com/VarunPatelius/Py-iMessenger/issues/4#issuecomment-1426613246, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCQ624WZULMRZFEPZCAXF3WW4KGBANCNFSM6AAAAAAUUPZEAU . You are receiving this because you authored the thread.Message ID: @.***>

nmacgregor avatar Feb 11 '23 05:02 nmacgregor

Yep, updated to 12.6.3 and no issues.

My best guess is that this might be a permissions thing. In the README I discussed setting up the right permissions so the file can be read. Did you try this during your initial setup?

VarunPatelius avatar Feb 11 '23 05:02 VarunPatelius

I believe I followed everything. I may have missed it though. I will double check and let you know.

On Fri, Feb 10, 2023, 9:38 PM Varun Patel @.***> wrote:

Yep, updated to 12.6.3 and no issues.

My best guess is that this might be a permissions thing. In the README I discussed setting up the right permissions so the file can be read. Did you try this during your initial setup?

— Reply to this email directly, view it on GitHub https://github.com/VarunPatelius/Py-iMessenger/issues/4#issuecomment-1426623544, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCQ6266IA4WU36LDI7PSETWW4QUFANCNFSM6AAAAAAUUPZEAU . You are receiving this because you authored the thread.Message ID: @.***>

nmacgregor avatar Feb 11 '23 20:02 nmacgregor