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

Could not create directory c:\ado\personal #53

Closed
lizalchemist opened this issue Oct 7, 2016 · 17 comments
Closed

Could not create directory c:\ado\personal #53

lizalchemist opened this issue Oct 7, 2016 · 17 comments

Comments

@lizalchemist
Copy link

I'm following the install instructions. I get to "brewcolors xkcd, make install replace", and I get the error:
could not create directory c:\ado\personal/
r(693);

That folder already exists on my computer, so I'm not sure why it needs to make the folder in the first place.

@wbuchanan wbuchanan self-assigned this Oct 7, 2016
@wbuchanan wbuchanan added the bug label Oct 7, 2016
@wbuchanan
Copy link
Owner

This is an issue with the way the confirm command is working internally. On non-Unix systems the PERSONAL path is not created on install, so this was a fail safe to ensure that the directory would get built prior to trying to build the subdirectories where some of the other files are stored. I'll need to add some platform specific logic since the r(601) error is only returned on non-Unix based systems.

@lizalchemist
Copy link
Author

Ok, that's good to know. I'd love to know when the bug is fixed, since I'm very excited to use this package.

@wbuchanan
Copy link
Owner

I'll try to see if I can work something in over the next week, but if not I should be able to get to it next week.

wbuchanan added a commit that referenced this issue Nov 9, 2016
…bugs identified in issue #53 and might help with some of the other path issues that might be behind issue #52
@wbuchanan
Copy link
Owner

@lizalchemist,

Can you try reinstalling the program from the Project Page and let me know if the problem you encountered is fixed now? It required a modification to a separate utility command dirfile, which now no longer uses the confirm command and has a more robust mechanism for handling existing subdirectories/files. If everything works well for you and I can replicate that it is fixed on someone else's Windows machine I'll push the most recent build to the SSC.

Thanks again,
Billy

net inst brewscheme, from("http://wbuchanan.github.io/brewscheme") replace force

@wbuchanan
Copy link
Owner

@rowen0718 can you check this out on your machine as well? I'll try to get in their today just to test things, but if I get pulled into a bunch of meetings this should be something easy to check out and then we can use it internally to develop some data visualization standards (e.g., create specific scheme files for different purposes that we could use).

@wbuchanan
Copy link
Owner

wbuchanan commented Nov 9, 2016

This issue is still here. Need to check for lines involving calls like

confirm file `c(sysdir_personal)'

across the commands.

@wbuchanan
Copy link
Owner

This error should be fixed for you now:

. ado, find(brewscheme)

. net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") force replace
checking brewscheme consistency and verifying not already installed...

the following files will be replaced:
    c:\ado\plus\jar\brewterpolate.jar
    c:\ado\plus\jar\filesys.jar

installing into c:\ado\plus\...
installation complete.

. brewcolordb, replace
This program needs to clear all data currently in memory. If this is ok hit enter, otherwise enter the letter 'n' and hit enter to exit the program without clearing data from memory.. 
(242 real changes made)

. brewscheme, scheme(set1) allst(set1) allc(5) allsat(80) replace
Directory exists and rebuild option not specified.  No further action


For bugs/issues, please submit issues to: 
http://github.com/wbuchanan/brewscheme
For additional information about the program visit: 
http://wbuchanan.github.io/brewscheme

@lizalchemist
Copy link
Author

Hi,

Sorry, I don't know what I'm doing wrong. When I type "net inst
brewscheme, from("https://wbuchanan.github.io/brewscheme/") replace",
everything goes great. But when I type "brewcolordb, replace", I get the
message "This program needs to clear all data currently in memory. If this
is ok hit enter, otherwise enter the letter 'n' and hit enter to exit the
program without clearing data from memory.. "

No matter how many times I hit enter, nothing happens, it's just stuck.

Thanks for all your hard work,
Liz

On Wed, Nov 9, 2016 at 9:59 AM, William Buchanan notifications@github.com
wrote:

Closed #53 #53.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#53 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVo7LWoCKAdjEk-NoVkuUJ1FnUh5_N_7ks5q8gnugaJpZM4KReTZ
.

@wbuchanan
Copy link
Owner

@lizalchemist,

It can take a little while and if it hangs like that it may be one of the earlier pushes to the system I made this morning where some calls were made quietly (which would make it appear that way). The most updated version should work for you, but you may need to do a complete uninstall of brewscheme first:

// This command will return a number inside square brackets
ado, find(brewscheme)

// Place that number inside the square brackets below and it should uninstall the package
ado uninstall [#]

// Then restart Stata and reinstall:
net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") force replace

@lizalchemist
Copy link
Author

Thanks for the tips. I have tried completely uninstalling brewscheme,
including using the instructions using loc files on "
https://wbuchanan.github.io/brewscheme/about/". As of this morning, the
console still does not respond when I hit enter after the "brewcolordb,
replace" command.

Cheers,
Liz

On Wed, Nov 9, 2016 at 11:52 AM, William Buchanan notifications@github.com
wrote:

@lizalchemist https://github.com/lizalchemist,

It can take a little while and if it hangs like that it may be one of the
earlier pushes to the system I made this morning where some calls were made
quietly (which would make it appear that way). The most updated version
should work for you, but you may need to do a complete uninstall of
brewscheme first:

// This command will return a number inside square brackets
ado, find(brewscheme)
// Place that number inside the square brackets below and it should uninstall the package
ado uninstall [#]
// Then restart Stata and reinstall:
net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") force replace


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#53 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVo7LVO_a36FHoyMMccHKJ_iGHds9eFlks5q8iSFgaJpZM4KReTZ
.

@wbuchanan
Copy link
Owner

@lizalchemist

Can you try doing something a bit different to help me Identify/isolate the issue you're running into? Do what was done before, but copy/paste the output from the results window from :

// This command will return a number inside square brackets
ado, find(brewscheme)

// Place that number inside the square brackets below and it should uninstall the package
ado uninstall [#]

// Then restart Stata and reinstall:
net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") force replace

// Set the tracedepth to show enough detail to locate where the failure occurs
set tracedepth 3

// Turn on the traceback 
set trace on

// Run the command while tracing the call stack
brewcolordb, replace

This should hopefully help to isolate where the hang occurs and it might be something where there needs to be a different kind of prompt or something. In either case this should show where in the source code things are stuck and then I can try to figure things out from there.

@wbuchanan wbuchanan reopened this Nov 10, 2016
@lizalchemist
Copy link
Author

lizalchemist commented Nov 10, 2016

Here's what I get:

. brewcolordb, replace
------------------------------------------------ begin brewcolordb ---

  • version 13.1
  • syntax [, DISplay REPlace OVERride]
  • if "override'"' == "" {
    = if `""' == "" {
- if `"`newfile'"' == "" mkdir `"`root'/`path'"' = if`"style"' == "" mkdir `"c:\ado\personal//style"' - else if `"`newfile'"' != "" & "`rebuild'" != "" chksubdir `root'/`newfile' = else if`"style"' != "" & "rebuild" != "" chksubdir c:\ado\personal//style

begin dirfile.chksubdir ---
- syntax anything(name = subdirnm id = "Subdirectory name")
- loc dirfiles : dir "subdirnm'"' dir "", respectcase
= loc dirfiles : dir "c:\ado\personal//style"' dir "_", respectcase - if : word countdirfiles'' > 0 { = if 0 > 0 { forv d = 1/: word countdirfiles'' { chksubdir subdirnm'/: word d' ofdirfiles'' } } - loc filenames : dir "subdirnm'"' files "_", respectcase = loc filenames : dir "c:\ado\personal//style"' files "
", respectcase
- if : word countfilenames'' > 0 {
= if 1141 > 0 {
- forv i = 1/: word countfilenames'' {
= forv i = 1/1141 {
- loc filenm : wordi' of filenames'' = loc filenm color-green_achromatopsia.style - di as res"Delete the file filenm' fromsubdirnm'? (Y/n)"'
_request(_del)
= di as res `"Delete the file color-green_achromatopsia.style from
c:\ado\personal//style? (Y/n)"' _request(_del)

@wbuchanan
Copy link
Owner

Are you seeing the message:

Delete the file color-green_achromatopsia.style from c:\ado\personal//style? (Y/n)

in the results window? And does anything happen after you hit enter? What about entering y or Y and then hitting enter?

@lizalchemist
Copy link
Author

So, nothing gets displayed unless the trace is on. The last line with
trace on is
"di as res `"c:\ado\personal//brewcolors is empty. Delete the directory
too? (Y/n)"' _request(_del)"

When I enter y, It spits out:

  • if inlist("del'"', "y", "Y") qui: rmdir "subdirnm'"'
    = if inlist("y"', "y", "Y") qui: rmdir"c:\ado\personal//brewcolors"'
    • }

end dirfile.chksubdir ---

  • else di as res "Directory exists and rebuild option not specified. No
    further action"

end dirfile ---

  • qui: dirfile c(sysdir_personal)', p(style)rebuild'
    = qui: dirfile c:\ado\personal/, p(style) rebuild

begin dirfile ---

  • version 13
  • syntax [anything(name = root id = "Root directory")], [ Path(string)
    REBuild ]
  • if "path'"' == "" loc path ""
    = if `"style"' == "" loc path "
    "
  • qui: loc newfile : dir "root'" dirs "path'", respectcase
    = qui: loc newfile : dir "c:\ado\personal/" dirs "style", respectcase
  • loc newfile : list clean newfile
  • if "newfile'"' == "" mkdir "root'/path'"' = if"style"' == "" mkdir `"c:\ado\personal//style"'
  • else if "newfile'"' != "" & "rebuild'" != "" chksubdir root'/newfile' = else if"style"' != "" & "rebuild" != "" chksubdir
    c:\ado\personal//style

begin dirfile.chksubdir ---
- syntax anything(name = subdirnm id = "Subdirectory name")
- loc dirfiles : dir "subdirnm'"' dir "", respectcase
= loc dirfiles : dir "c:\ado\personal//style"' dir "_", respectcase - if : word countdirfiles'' > 0 { = if 0 > 0 { forv d = 1/: word countdirfiles'' { chksubdir subdirnm'/: word d' ofdirfiles'' } } - loc filenames : dir "subdirnm'"' files "_", respectcase = loc filenames : dir "c:\ado\personal//style"' files "
", respectcase
- if : word countfilenames'' > 0 {
= if 1138 > 0 {
- forv i = 1/: word countfilenames'' {
= forv i = 1/1138 {
- loc filenm : wordi' of filenames'' = loc filenm color-green_tritanopia.style - di as res"Delete the file filenm' fromsubdirnm'? (Y/n)"'
_request(_del)
= di as res `"Delete the file color-green_tritanopia.style from
c:\ado\personal//style? (Y/n)"' _request(_del)

I keep entering y, and it cycles through the last lines:
di as res "Delete the file color-gs0_achromatopsia.style from c:\ado\personal//style? (Y/n)"' _request(_del) di as res"Delete the file color-gs0_deuteranopia.style from
c:\ado\personal//style? (Y/n)"' _request(_del)
di as res "Delete the file color-gs0_protanopia.style from c:\ado\personal//style? (Y/n)"' _request(_del) di as res"Delete the file color-gs0_tritanopia.style from
c:\ado\personal//style? (Y/n)"' _request(_del)

It repeats and never ends.

On Thu, Nov 10, 2016 at 1:28 PM, William Buchanan notifications@github.com
wrote:

Are you seeing the message:

Delete the file color-green_achromatopsia.style from c:\ado\personal//style? (Y/n)

in the results window? And does anything happen after you hit enter? What
about entering y or Y and then hitting enter?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#53 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVo7LWv4QVQYjBWE9TIzL6g4yqgToDEQks5q84x7gaJpZM4KReTZ
.

@wbuchanan
Copy link
Owner

This is to avoid deleting any files in the subdirectory without the end-user's explicit permission. The lines:

Delete the file color-gs0_achromatopsia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_deuteranopia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_protanopia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_tritanopia.style from c:\ado\personal//style? (Y/n)

Are iterating through each of the files in the subdirectory C:\ado\personal\style. If you wanted, you could delete that subdirectory manually from the operating system. When you run the command above after that there will be no files over which to iterate, so you won't see those prompts as much. This is showing some of the internal features of the toolkit, which is to automatically create versions of the files that are simulated to represent the different forms of color sight impairments.

@lizalchemist
Copy link
Author

Awesome progress! Ok, so manually deleting the style folder allows the
command to run. So, I've got the basics: mixed1, blues, set1, etc. When I
try other schemes, like pastel1, I get "(note: scheme pastel1 not found,
using s2color)".

I presume these would be in the "brewcolors xkcd, make install replace",
right? When I type that command, I get:

Directory exists and rebuild option not specified. No further action
Directory exists and rebuild option not specified. No further action
server reported server error
could not open url
r(603);

On Thu, Nov 10, 2016 at 3:13 PM, William Buchanan notifications@github.com
wrote:

This is to avoid deleting any files in the subdirectory without the
end-user's explicit permission. The lines:

Delete the file color-gs0_achromatopsia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_deuteranopia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_protanopia.style from c:\ado\personal//style? (Y/n)
Delete the file color-gs0_tritanopia.style from c:\ado\personal//style? (Y/n)

Are iterating through each of the files in the subdirectory
C:\ado\personal\style. If you wanted, you could delete that subdirectory
manually from the operating system. When you run the command above after
that there will be no files over which to iterate, so you won't see those
prompts as much. This is showing some of the internal features of the
toolkit, which is to automatically create versions of the files that are
simulated to represent the different forms of color sight impairments.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#53 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVo7Laq-_I_eT-61VhpbLaI2UOYDGI5iks5q86U2gaJpZM4KReTZ
.

@wbuchanan
Copy link
Owner

@lizalchemist

Not sure I know what is happening. I really need to know what command resulted in the error/warning in order to have any chance of helping out.

For the last error message, that would be better served by opening a new issue since it isn't related to this particular issue. The same thing could also be said for the warning note that you ran into. I'll close this issue, but feel free to open the others with more specifics. Generally, if you do the whole:

set tracedepth 2
set trace on

Before running the command it will provide much better information to help debug things.

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

No branches or pull requests

2 participants