Setup Error: AttributeError: 'Element' object has no attribute 'doc_id'
CDeLeon94 opened this issue · 6 comments
I was trying to use this package today, and I kept getting an error that stated my device might be in use. I had no other applications that I thought could be the culprit. So I opened up the code.
By adding these changes:
++2:import traceback
++1523: traceback.print_exc()
I got a stack trace below:
>python setup.py
MIDItoOBS made by https://github.com/lebaston100
This setup assistant will guide you though the initial setup. If you experience any problems that you can not solve on your own feel free to open an issue on Github
!!Important!!
!!MAKE SURE OBS IS RUNNING OR THIS SCRIPT WILL CRASH!!
!!MAKE SURE THAT THE MIDI DEVICE(S) ARE NOT IN USE BY ANOTHER APPLICATION!!
Please select the number of what you want to do:
1: Re-Setup the midi devices that are used.
2: Leave the selected midi devices as-is and just edit button/fader assignment
Select 1 or 2: 2
Traceback (most recent call last):
File "C:\Users\chris\Downloads\MIDItoOBS-0.2.5\MIDItoOBS-0.2.5\setup.py", line 1520, in <module>
tempobj = {"id": device.doc_id, "object": tempmidiport, "devicename": device["devicename"]}
AttributeError: 'Element' object has no attribute 'doc_id'
Could not open device LPD8 0
The midi device might be used by another application/not plugged in/have a different name.
Please close the device in the other application/plug it in/edit the name in the config.json and restart this script.
I'll dig a little further, but wanted to throw this up here in case its a simple fix that you may respond before I can figure it out.
The only thing i could think of right now without actually checking anything is that a new version of tinydb does no longer have the .doc_id object
It looks like that could actually be true. The requirements specify 3.3.0 which is from 2017. Current is 4.3.0. And there were some breaking changes in the major release.
I had tinydb-3.3.0
installed, though I swear I just did pip install tinydb
. I uninstalled, and reinstalled via pip install tinydb
and it seems to be working.
Forgot to mention, its now using tinydb-4.3.0
Thanks for the report. I'll investigate that further soon and maybe update the version.
Thanks for the tool, and the blazing fast response. 😁