Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacMachineConfig gives an error when I try to run MacLocalIndexer. #68

Open
ZeeOneOtter opened this issue Oct 7, 2024 · 4 comments
Open
Assignees

Comments

@ZeeOneOtter
Copy link
Collaborator

I can run the IndalekoMacMachineConfig - no errors, no outputs. I can run the MacHardwareInfoGenerator.py and it creates the following file. But when I try to run IndalekoLocalIndexer this error is thrown. Though I will note I have tried various changing of naming variables, and assertions. and I get confused with the interconnections.

zeethompson@Zees-MacBook-Air Indaleko % python IndalekoMacLocalIndexer.py

./config/macos-hardware-info-31475dd5-c9e6-4d8b-bb1f-e0f52eecc72f-2024-08-28T20-53-09.417935Z.json
ic| kwargs: {'Captured': {'Label': 'eb7eaeed-6b21-4b6a-a586-dddca6a1d5a4',
'Value': '2024-08-28T20:53:09.417935+00:00'},
'Platform': {'hardware': {'CPU': 'arm', 'Cores': 8, 'Version': 'Unknown'},
'software': {'Architecture': 'arm64',
'Hostname': 'unknown',
'OS': 'macOS',
'Version': '23.6.0'}},
'Record': {'Attributes': {'CPU': {'Cores': 8, 'Name': 'arm'},
'MachineGuid': '31475dd5-c9e6-4d8b-bb1f-e0f52eecc72f',
'OperatingSystem': {'Caption': 'macOS',
'OSArchitecture': 'arm64',
'Version': '23.6.0'},
'VolumeInfo': [{'Filesystem': 'apfs',
'Size': '1858.19 GB',
'UniqueId': '/dev/disk3s1s1',
'VolumeName': 'disk3s1s1'},
{'Filesystem': 'apfs',
'Size': '1858.19 GB',
'UniqueId': '/dev/disk3s6',
'VolumeName': 'disk3s6'},
{'Filesystem': 'apfs',
'Size': '1858.19 GB',
'UniqueId': '/dev/disk3s2',
'VolumeName': 'disk3s2'},
{'Filesystem': 'apfs',
'Size': '1858.19 GB',
'UniqueId': '/dev/disk3s4',
'VolumeName': 'disk3s4'},
{'Filesystem': 'apfs',
'Size': '0.49 GB',
'UniqueId': '/dev/disk2s2',
'VolumeName': 'disk2s2'},
{'Filesystem': 'apfs',
'Size': '0.49 GB',
'UniqueId': '/dev/disk2s1',
'VolumeName': 'disk2s1'},
{'Filesystem': 'apfs',
'Size': '0.49 GB',
'UniqueId': '/dev/disk2s3',
'VolumeName': 'disk2s3'},
{'Filesystem': 'apfs',
'Size': '1858.19 GB',
'UniqueId': '/dev/disk3s5',
'VolumeName': 'disk3s5'}]},
'Data': 'hKtNYWNoaW5lR3VpZNkkMzE0NzVkZDUtYzllNi00ZDhiLWJiMWYtZTBmNTJlZWNjNzJmr09wZXJhdGluZ1N5c3RlbYOnQ2FwdGlvbqVtYWNPU65PU0FyY2hpdGVjdHVyZaVhcm02NKdWZXJzaW9upjIzLjYuMKNDUFWCpE5hbWWjYXJtpUNvcmVzCKpWb2x1bWVJbmZvmISoVW5pcXVlSWSuL2Rldi9kaXNrM3MxczGqVm9sdW1lTmFtZalkaXNrM3MxczGkU2l6ZaoxODU4LjE5IEdCqkZpbGVzeXN0ZW2kYXBmc4SoVW5pcXVlSWSsL2Rldi9kaXNrM3M2qlZvbHVtZU5hbWWnZGlzazNzNqRTaXplqjE4NTguMTkgR0KqRmlsZXN5c3RlbaRhcGZzhKhVbmlxdWVJZKwvZGV2L2Rpc2szczKqVm9sdW1lTmFtZadkaXNrM3MypFNpemWqMTg1OC4xOSBHQqpGaWxlc3lzdGVtpGFwZnOEqFVuaXF1ZUlkrC9kZXYvZGlzazNzNKpWb2x1bWVOYW1lp2Rpc2szczSkU2l6ZaoxODU4LjE5IEdCqkZpbGVzeXN0ZW2kYXBmc4SoVW5pcXVlSWSsL2Rldi9kaXNrMnMyqlZvbHVtZU5hbWWnZGlzazJzMqRTaXplpzAuNDkgR0KqRmlsZXN5c3RlbaRhcGZzhKhVbmlxdWVJZKwvZGV2L2Rpc2syczGqVm9sdW1lTmFtZadkaXNrMnMxpFNpemWnMC40OSBHQqpGaWxlc3lzdGVtpGFwZnOEqFVuaXF1ZUlkrC9kZXYvZGlzazJzM6pWb2x1bWVOYW1lp2Rpc2syczOkU2l6ZacwLjQ5IEdCqkZpbGVzeXN0ZW2kYXBmc4SoVW5pcXVlSWSsL2Rldi9kaXNrM3M1qlZvbHVtZU5hbWWnZGlzazNzNaRTaXplqjE4NTguMTkgR0KqRmlsZXN5c3RlbaRhcGZz',
'SourceIdentifier': {'Identifier': '8a948e74-6e43-4a6e-91c0-0cb5fd97355e',
'Version': '1.0'},
'Timestamp': '2024-10-07T21:57:08.490955+00:00'},
'hostname': 'Unknown',
'machine_id': '31475dd5-c9e6-4d8b-bb1f-e0f52eecc72f'}
Traceback (most recent call last):
File "/Users/zeethompson/indaleko/Indaleko/IndalekoMacLocalIndexer.py", line 205, in
main()
File "/Users/zeethompson/indaleko/Indaleko/IndalekoMacLocalIndexer.py", line 163, in main
machine_config = IndalekoMacOSMachineConfig.load_config_from_file(config_file=pre_args.config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zeethompson/indaleko/Indaleko/IndalekoMacMachineConfig.py", line 126, in load_config_from_file
config = IndalekoMacOSMachineConfig(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zeethompson/indaleko/Indaleko/IndalekoMacMachineConfig.py", line 63, in init
super().init(**kwargs)
File "/Users/zeethompson/indaleko/Indaleko/IndalekoMachineConfig.py", line 56, in init
kwargs['data']['MachineUUID']
~~~~~~^^^^^^^^
KeyError: 'data'

@fsgeek fsgeek self-assigned this Oct 12, 2024
@fsgeek
Copy link
Contributor

fsgeek commented Oct 12, 2024

From what I see it looks like the data isn't in the format expected. I see 'Data' in the output but then a reference to 'data' failing.

To debug further, I'd need a configuration file.

@fsgeek
Copy link
Contributor

fsgeek commented Oct 12, 2024

Specifically, this file: macos-hardware-info-31475dd5-c9e6-4d8b-bb1f-e0f52eecc72f-2024-08-28T20-53-09.417935Z.json

That should be in your "config" directory.

@fsgeek
Copy link
Contributor

fsgeek commented Oct 13, 2024

I found an older configuration file, which allowed me to debug this, though if there have been any changes in the way these are generated this might not work right. For example, I see that the change to include the "hostname" in the file was not present in the config file that I used. While it should work if the data is present, I haven't tested it to verify this is the case.

Commit 1ff6b94 introduces the relevant changes.

@fsgeek
Copy link
Contributor

fsgeek commented Oct 13, 2024

While testing a bit further I find that the list operation is failing with a key error:

Configuration for machine: unknown
Traceback (most recent call last):
File "C:\Users\TonyMason\source\repos\indaleko\IndalekoMacMachineConfig.py", line 242, in
main()
File "C:\Users\TonyMason\source\repos\indaleko\IndalekoMacMachineConfig.py", line 212, in main
print(f'\t UUID: {config["_key"]}')
~~~~~~^^^^^^^^
KeyError: '_key'

This seems odd since I can see the _key in the debug output earlier. Probably not quite where it expected to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants