Config Directory

  • phillc54
  • phillc54's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
09 Feb 2020 06:40 #156830 by phillc54
Config Directory was created by phillc54
Just a nitpick but if you try to run a config from anything other than ~/linuxcnc/configs then a preference file cannot be created.

I inadvertently came across this when I tried to run QtDragon from where it was downloaded.

Warning: Spoiler!

Please Log in or Create an account to join the conversation.

More
09 Feb 2020 06:46 #156833 by cmorley
Replied by cmorley on topic Config Directory
Thank you i'll look into it.

Chris

Please Log in or Create an account to join the conversation.

More
09 Feb 2020 07:40 #156841 by cmorley
Replied by cmorley on topic Config Directory
So looking into this a bit - it is caused by the original integrator setting the preference file inside his config folder. Of course you don't have that folder on your system so it fails (qtvcp will make the file but not the folders)

Did it make qtvcp fail to load? i can't immediately see why - it should just not have saving capability - but i have not tested this recently.

The question then is how do we facilitate Jim's intent (preference file in the config folder) while still being moveable.

maybe a magic filepath word ie. CONFIGFOLDER/.qtdragon_preference
meaning it saves in whatever config folder it was run from...

Chris

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
09 Feb 2020 08:24 #156844 by phillc54
Replied by phillc54 on topic Config Directory

So looking into this a bit - it is caused by the original integrator setting the preference file inside his config folder. Of course you don't have that folder on your system so it fails (qtvcp will make the file but not the folders)

OK, that makes sense.

Did it make qtvcp fail to load? i can't immediately see why - it should just not have saving capability - but i have not tested this recently.

Yes, it doesn't load the gui and gives the messages in the terminal I posted earlier plus a popup error message

The question then is how do we facilitate Jim's intent (preference file in the config folder) while still being moveable.

maybe a magic filepath word ie. CONFIGFOLDER/.qtdragon_preference
meaning it saves in whatever config folder it was run from...

Yes, I think the prefs file should always be where the ini file is.

I guess 99.9% of people won't do what I did and they will put it in ~/linuxcnc/configs where it belongs...

Please Log in or Create an account to join the conversation.

More
09 Feb 2020 08:34 #156845 by cmorley
Replied by cmorley on topic Config Directory
I have made a change to screenoptions that will replace CONFIGFOLDER with the launched config path to facilitate the behavior.

I tested somewhat the error of specifying a location that was not possible but didn't get an error dialog.
could you run it again and see if the dialog said anything different - pressing cancel on the dialog should print the error in the terminal.

Chris

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Away
  • Platinum Member
  • Platinum Member
More
09 Feb 2020 08:40 #156846 by phillc54
Replied by phillc54 on topic Config Directory
Traceback (most recent call last):
  File "/usr/bin/qtvcp", line 492, in <module>
    APP = QTVCP()
  File "/usr/bin/qtvcp", line 349, in __init__
    window.handler_instance.initialized__()
  File "/home/phill/imac/Downloads/qtdragon/qtdragon_handler.py", line 68, in initialized__
    self.PROBE.get_prefs()
  File "/home/phill/imac/Downloads/qtdragon/probe.py", line 54, in get_prefs
    self.w.lineEdit_probe_tool.setText(str(self.w.PREFS_.getpref('Probe tool', 0, int, 'PROBE OPTIONS')))
AttributeError: 'NoneType' object has no attribute 'getpref'

Please Log in or Create an account to join the conversation.

More
09 Feb 2020 08:45 #156849 by cmorley
Replied by cmorley on topic Config Directory
Ahh perfect it's specific to qtdragon thats an easy fix.

Thank you.

Chris

Please Log in or Create an account to join the conversation.

More
10 Feb 2020 17:07 #156971 by persei8
Replied by persei8 on topic Config Directory
Is there something I should change in the source files?

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.113 seconds
Powered by Kunena Forum