DiyLightAnimation

Software => Nutcracker: RGB Effects Builder => Topic started by: smeighan on January 31, 2013,

Title: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on January 31, 2013,
I have released the new command to go and rebuild the gallery on your local installs.

You need both a new code fiel from github (Step#5), you also need to reinstall a new database (Step #7).

After doing this refresh you will see a new command in the admin tab

(http://nutcracker123.com/nutcracker/images/rebuild_gallery.png)

Click on this and then let it run for 12-18 hours. You should hend up with around 6600 animated gifs.

thanks
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on January 31, 2013,
Shouldl I be seeing any activity on the screen.

I got a bunch of warnings and screams.

Is that to be expected?
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 01, 2013,
You are not allowed to view links. Register or Login
Shouldl I be seeing any activity on the screen.

I got a bunch of warnings and screams.

Is that to be expected?

did you download latest github and reinstall the database?

Step #5, #7 of this link http://doityourselfchristmas.com/forums/showthread.php?21784-Nutcracker-Local-Install-of-Nutcracker
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: tomwb301 on February 01, 2013,
Sean,

I can't seem to get it to work. Tried 4 or 5 times.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: bakerlights on February 01, 2013,
I followed the update instructions and restarted everything.  I was having issues with it processing also, as it could not find the M16_50.dat file to copy.   I went ahead and created a M16_50 model as my user then I copied the file from c:\xampp\htdocs\nutcracker\targets\1083\M16_50.dat to c:\xampp\htdocs\nutcracker\targets\2

1083 is my userid number, yours will be different.  Looks like Sean's is 2

After copying the M16_50.dat file it started rebuilding the images, been processing since about 9am today.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: bakerlights on February 01, 2013,
I also got this error at the beginning of the rebuild:

Warning: set_error_handler() expects the argument (customError) to be a valid callback in C:\xampp\htdocs\nutcracker\effects\generate_gallery_gifs.php on line 165

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\nutcracker\effects\generate_gallery_gifs.php:155) in C:\xampp\htdocs\nutcracker\conf\auth.php on line 3

And I get this Warning after each user's effect rebuild:

Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\nutcracker\effects\generate_gallery_gifs.php on line 484

Not sure if I should be concerned with any of these Warnings.   Hopefully not, but if so, I can always restart the rebuild after the issues are fixed.

Let me know if I can supply any more information to help debug.

Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 01, 2013,
I got the following list of errors.

 Warning: set_error_handler() expects the argument (customError) to be a valid callback in C:\wamp\www\nutcracker\effects\generate_gallery_gifs.php on line 165
Call Stack

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\nutcracker\effects\generate_gallery_gifs.php:155) in C:\wamp\www\nutcracker\conf\auth.php on line 3
Call Stack

 Warning: copy(C:\wamp\www\nutcracker\targets/2/M16_50.dat): failed to open stream: No such file or directory in C:\wamp\www\nutcracker\effects\generate_gallery_gifs.php on line 447

failed to copy C:\wamp\www\nutcracker\targets/2/M16_50.dat to C:\wamp\www\nutcracker\targets/2/M16_50.dat

Warning: fopen(../targets/2/M16_50.dat): failed to open stream: No such file or directory in C:\wamp\www\nutcracker\effects\read_file.php on line

can't open file ../targets/2/M16_50.dat

I did a reinstall.


Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 01, 2013,
Guys;
i forgot one important note.

You need to create the target dat file that i cam cloning to the 1000 users.

Here is how to do that
1) Login as user f, password f
2) Got to the models tab. Click on M16_50
3) Click to generate the model
4) Now go run the gallery rebuild (Admin, Rebuild the Effect Gallery)

sorry for that one missing step.

-- OR --

you can download github again and repeat step #5. I have added M16_50.dat to the repository.


thanks
sean
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: bakerlights on February 01, 2013,
You are not allowed to view links. Register or Login
Guys;
i forgot one important note.

You need to create the target dat file that i cam cloning to the 1000 users.

Here is how to do that
1) Login as user f, password f
2) Got to the models tab. Click on M16_50
3) Click to generate the model
4) Now go run the gallery rebuild (Admin, Rebuild the Effect Gallery)

sorry for that one missing step.

Did not have your password earlier, so I create my own M16_50 model and copied the M16_50.dat file into the targets\2 directory, do you think there will be any problems or should I stop and follow the latest instructions then restart?

Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 01, 2013,
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Guys;
i forgot one important note.

You need to create the target dat file that i cam cloning to the 1000 users.

Here is how to do that
1) Login as user f, password f
2) Got to the models tab. Click on M16_50
3) Click to generate the model
4) Now go run the gallery rebuild (Admin, Rebuild the Effect Gallery)

sorry for that one missing step.

Did not have your password earlier, so I create my own M16_50 model and copied the M16_50.dat file into the targets\2 directory, do you think there will be any problems or should I stop and follow the latest instructions then restart?

no problem as long as your megatree was 180 degrees (remember enter 32 strings) and 50 pixels.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: mrduncan on February 01, 2013,
I downloaded the new code tree about 30 minutes ago and I created a M16_50.dat file.  I see the file in C:\xampp\htdocs\nutcracker\targets\987 and C:\xampp\htdocs\nutcracker\targets\2.  When I run "Rebuild the effect gallary......", I get an error at the very bottom of the screen which says:  failed to copy C:\xampp\htdocs\nutcracker\targets/2/M16_50.dat to C:\xampp\htdocs\nutcracker\targets/2/M16_50.dat.

Any suggestions on what happened?
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: kgustafson on February 01, 2013,
You are not allowed to view links. Register or Login
I downloaded the new code tree about 30 minutes ago and I created a M16_50.dat file.  I see the file in C:\xampp\htdocs\nutcracker\targets\987 and C:\xampp\htdocs\nutcracker\targets\2.  When I run "Rebuild the effect gallary......", I get an error at the very bottom of the screen which says:  failed to copy C:\xampp\htdocs\nutcracker\targets/2/M16_50.dat to C:\xampp\htdocs\nutcracker\targets/2/M16_50.dat.

Any suggestions on what happened?

Make double sure that you have created the target as stated above.  It has to be for user 'f' (that is member id = 2) and it has to be for a target called 'M16_50' (thus the directory/file it is looking for is the target for member id 2 name M16_50.dat.

So, I recommend that you log into your local nutcracker with username 'f' password 'f' go to targets (models) and generate M16_50 (make sure to generate it, if it is in red text in the listing under target, that means that the .dat file is missing.)

Once you do that, you can run the command without issues.

I suspect that you created a target M16_50 under YOUR username (which is certainly NOT member id 2). 

Kurt
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: mrduncan on February 01, 2013,
Perfect......that seems to have fixed the problem.  I see the files being created.  Most files being generated  are "green", however, some are indicating "skipping" or "rebuilding".
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 02, 2013,
You are not allowed to view links. Register or Login
Perfect......that seems to have fixed the problem.  I see the files being created.  Most files being generated  are "green", however, some are indicating "skipping" or "rebuilding".

GREEN "ok" means it has found the animated gif and does not need to generate it again.

Remember when you are all done to run
http://localhost/nutcracker/effects/create_gallery.php

So that the newly created gifs can be added into teh database.

Now you can go view (and copy) effects that you see in your local install.

Since this generation creates lots of files, you might want to make sure you have WinDirStat.
http://sourceforge.net/projects/windirstat/files/windirstat/1.1.2%20installer%20re-release%20%28more%20languages%21%29/windirstat1_1_2_setup.exe/download?use_mirror=superb-dca3

Free program that easily allows you to see the largest directories on your system.


All of these animated gifs will be stored in C:\xampp\htdocs\nutcracker\effects\workspaces.


Location: C:\xampp\htdocs\nutcracker\effects
size:        3.06 GB (3,296,646,737 bytes)
Contains:  13,744 Files, 374 Folders

Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 02, 2013,
You are not allowed to view links. Register or Login
Guys;
i forgot one important note.

You need to create the target dat file that i cam cloning to the 1000 users.

Here is how to do that
1) Login as user f, password f
2) Got to the models tab. Click on M16_50
3) Click to generate the model
4) Now go run the gallery rebuild (Admin, Rebuild the Effect Gallery)

sorry for that one missing step.

-- OR --

you can download github again and repeat step #5. I have added M16_50.dat to the repository.


thanks
sean

This process seems to have taken care of the error problem.

Started it last night, still going. Will let you know if it is successful.

QUESTION?
Can I copy this database on a local network.

After installing the new program what file should I copy from one machine to another?

Will there be a way to update this database from effects generated on the web?

Is this the same as the menu command?
http://localhost/nutcracker/effects/create_gallery.php
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 02, 2013,


QUESTION?
Can I copy this database on a local network.

yes, you can do anything you want to the local database

After installing the new program what file should I copy from one machine to another?

If you are setting up a second machine, i would follow steps one to seven. Now you have two local install son two machines. If you have modified data on the first local machine then run phpmyadmin and do an export of the nutcracker schema. read how to do export/import.

Will there be a way to update this database from effects generated on the web?
Not yet. That is coming with the new nutcracker. The only thing you can do is replace the local database with a new copy from nutcracker123.com

Is this the same as the menu command?
http://localhost/nutcracker/effects/create_gallery.php

Rebuild the gallery is two steps.
1)http://localhost/nutcracker/effects/generate_gallery_gifs.php
This goes through every users effects by querying the database., It then looks to see if that user has the animated gif in their ../effects/workspaces/{member_id} directory. If yes, you see a GREEN "ok",if not it calls the appropriate effect code and u see a PURPLE "rebuilding".
This process will take hours

2) http://localhost/nutcracker/effects/create_gallery.php. The purpose of this command is to walk through all the animated gifs and make sure therre is an entry in the GALLERY table in the database. When you go to the Gallery from the menu, it queries the GALLERY database.



thanks
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: Danbe on February 02, 2013,
In 1 1/2 hours I have  1,869 Files, 8 Folders and still downloading Everything going good my side >.d9 >.d9 >.d9 >.d9
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: mrduncan on February 02, 2013,
Sean,

From your thread below:

"Remember when you are all done to run
http://localhost/nutcracker/effects/create_gallery.php.
So that the newly created gifs can be added into the database.
Now you can go view (and copy) effects that you see in your local install."

I stop the download program after 23 hours of running with 75 new folders and 17K new files.

I see all the individual folders and animated GIF's.  What does "create_gallery.php" do?  And, what does "add to database mean"?

CORRECTION:  I now see what the "create_gallery.php" does.  That is to cool!!!!!!  Gallery now has 3812 GIFs.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 02, 2013,
I am at 24hours..

Any idea how much longer this is going to take.

I am running this on a i7 quad core processor.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: kgustafson on February 03, 2013,
You are not allowed to view links. Register or Login
Sean,

From your thread below:

"Remember when you are all done to run
http://localhost/nutcracker/effects/create_gallery.php.
So that the newly created gifs can be added into the database.
Now you can go view (and copy) effects that you see in your local install."

I stop the download program after 23 hours of running with 75 new folders and 17K new files.

I see all the individual folders and animated GIF's.  What does "create_gallery.php" do?  And, what does "add to database mean"?

CORRECTION:  I now see what the "create_gallery.php" does.  That is to cool!!!!!!  Gallery now has 3812 GIFs.

And to clarify, create_gallery.php 'walks' through your local installed animated gifs and sets up entries in the database table that gallery uses to generate the gallery itself.  This command actually looks at all files under your effects/workspaces directory to do this (thus why you want to run the generated command first, to generate the actual animated gifs.)  Another thing to do is that when you have created a bunch of new effects--which, in turn,  generates new animated gifs--is to run the create_gallery command again to make these newly created effects show up in the gallery.

Kurt
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 03, 2013,
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

http://localhost/nutcracker/effects/generate_gallery_gifs.php

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

http://localhost/nutcracker/effects/create_gallery.php.

I will post if I have any problems.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: Danbe on February 03, 2013,
You are not allowed to view links. Register or Login
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

http://localhost/nutcracker/effects/generate_gallery_gifs.php

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

http://localhost/nutcracker/effects/create_gallery.php.

I will post if I have any problems.


Same here everything stop about 10 15 minute ago
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 03, 2013,
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

http://localhost/nutcracker/effects/generate_gallery_gifs.php

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

http://localhost/nutcracker/effects/create_gallery.php.

I will post if I have any problems.


Same here everything stop about 10 15 minute ago

if you do not use "End of program", it ha snot finished going through all users.

Understand what this program is doing. It is going though a 1000 users and for each calling multiple  effects. Sionce nutcracker is a web based operation, we need to suppress all the prompts that poccur when u use it normally.

so we setup a batch mode. pass in all parameters as if you had filled ina  form, now it runs through the effect. If any effect abrubtly dies, the program is done and the cursor prompt will change back to normal.

If i every see the busy icon of the cursor go back to normal, i just reload the page. i think i had to do this 3 or 5 times. I did go through and fix many of these dies. This is why you see almost every effect had been modified in this release.

The issue is 7000 effects have a small percentage with very bad data. Alpha fields in numbers, frame timing (sb 25-100) having values like 0.01 .etc.
In the next major release , we will improve data validation of all prompts. So why were these problems never raised before. I think if someones effect didnt work, they just recreated another, it works and they used that one.

So , in summary, if you dont see "End of Program" do a shift reload. You will now see lots of GREE "ok" until you reach where you left off. Then you start to see thre purple"rebuilding".


Be aware , there is one effect that loops forever. The user is Greg in Canby, member_id=215.

When i did a run, i let the process go overnight. I stopped the browser the next day and did a reload. It then skipped the file it was on. I later went back and looked at ../effects/workspaces/215 and found a 420gb file!.

I have gone and logged in to his account. he only has a few effects. one f them is a spiral that is causing the issue. I see no issue with his data but it does get into a loop. I still have to debug why, one effect out of 7000 has this issue.

for now, if your screen is not advancing at least one "rebuilding" every 5 minutes. stop the browser and reload it. Remember that i skip the last effect you were stuck on.
Remember that i originally said it would take 48 hours to rebuild. I did some things that havd dropped this to more like 12-18 hours. But ... therecan be two things that can happen

1) An effect that you are running exits with a die(message) command. Remember in batch mode you dont see all the exhoes , prints and dies
2) You hit an effect that loops

In both cases, stop teh browser and reload is the fix.


thanks
sean


Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: caretaker on February 03, 2013,
I can verify that the command works correctly as I went through about 18 hours of rebuilding till I noticed my hard drive had filled.... <fp.  So after I get a new drive I will try again. As a note to others, make sure you have at least 100gigs of free space before you try this. 
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 03, 2013,
You are not allowed to view links. Register or Login
I can verify that the command works correctly as I went through about 18 hours of rebuilding till I noticed my hard drive had filled.... <fp.  So after I get a new drive I will try again. As a note to others, make sure you have at least 100gigs of free space before you try this.
Quote from: Xenia;258251
I found two files that were the problem.

Folder 209 file: M16_50~2_d_2.dat 109GB
Folder 215 File: M16_50~2_d_2.dat 306GB

7000 effects should take about 3gigbytes.

There is one bad effect that exists in 3 different accounts.

Here is the easiest way to fix this.

go to "localhost" not "localhost/nutcracker"

You should now be on the splash page of either wamp or xampp. You want to find MyPhpAdmin and click on it to run it.

On the left side you will see all the mysql databases.

left click on the database "nutcracker(24)"

Now you are able to execute queries against these databases.

So click on the second tab that says "SQL" and paste this query

delete FROM `effects_user_hdr` WHERE effect_name='2' and effect_class='spirals'

click go to execute it.

It should say 3 rows deleted


 delete any files from
../effects/workspaces/209/*.dat
../effects/workspaces/215/*.dat

Now go through the rebuild process.


This is why i was going to hold off on the gallery rebuild, it has lots of parts to it.

let me know if you got to "End of Program". Total disk space for the gallery should be < 4 gigabytes.

thanks
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 03, 2013,
Well I wanted to do it on my notebook but I ran out of disk space on C: so I am going to see if I can do it on drive D: but it only has 270GB available on it and drive C: had 247GB free.

Oh well I guess it just takes up too much space to do it locally. :(

Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: kgustafson on February 03, 2013,
You are not allowed to view links. Register or Login
Well I wanted to do it on my notebook but I ran out of disk space on C: so I am going to see if I can do it on drive D: but it only has 270GB available on it and drive C: had 247GB free.

Oh well I guess it just takes up too much space to do it locally. :(



Are you sure that isn't enough space?!  Or are you meaning MBs and not GBs?  270GB or 247GB should be plenty.

Kurt
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 03, 2013,
My notebook has 2 500GB drives totally 1TB. C: and D:

I will try the 'fix' from Shawn to see if that solves the problem later on.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: jnealand on February 03, 2013,
Seems to me the simple solution is work on my physical builds and wait until version 2 is ready.  I definitely will not be working on sequencing for a couple of months.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 03, 2013,
For those who are having a hard time rebuilding the gallery. I have copied all the effects into a 7zip file
http://nutcracker123.com/nutcracker/tutorials/workspaces.7z



unzip them to C:\xampp\htdocs\nutcracker\effects\workspaces\ if you have xampp and to C:\wamp\www\nutcracker\effects\workspaces\ if you have wamp


be sure to run http://localhost/nutcracker/effects/create_gallery.php after you have unzipped this file. You need to generate entries in your local database for these new files.

thanks
sean
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 04, 2013,
Much easier process.

Thanks,

Tom
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: caretaker on February 04, 2013,
You are not allowed to view links. Register or Login
Are you sure that isn't enough space?!  Or are you meaning MBs and not GBs?  270GB or 247GB should be plenty.

Kurt

Yep Kurt it was GIGAbytes....  I had about 60 GIGs free on my C: drive and when I checked in the morning I had 8 megs free...  I am not sure which took more the files or the Database... either way it is the best excuse for getting a new 1 TB drive  8)
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: kgustafson on February 04, 2013,
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Are you sure that isn't enough space?!  Or are you meaning MBs and not GBs?  270GB or 247GB should be plenty.

Kurt

Yep Kurt it was GIGAbytes....  I had about 60 GIGs free on my C: drive and when I checked in the morning I had 8 megs free...  I am not sure which took more the files or the Database... either way it is the best excuse for getting a new 1 TB drive  8)

That's a great way to think about it! LOL.

I think that the cycle error (mentioned above) is causing the problem.  The system should NOT take that much space even with the animated GIFs.

Kurt
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: caretaker on February 04, 2013,
Used Sean's 7zip download and followed his instructions and now have a beautiful gallery of animated gif's! and still have 55 gigs free! (Don't tell my wife...)  Thank Sean and Kurt!   <res.
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: smeighan on February 04, 2013,
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Are you sure that isn't enough space?!  Or are you meaning MBs and not GBs?  270GB or 247GB should be plenty.

Kurt

Yep Kurt it was GIGAbytes....  I had about 60 GIGs free on my C: drive and when I checked in the morning I had 8 megs free...  I am not sure which took more the files or the Database... either way it is the best excuse for getting a new 1 TB drive  8)

7000 images should be between 1-2 gbytes. two of teh 7000 effects got in a loop. on my machine one effect created a dat file that was 409gbytes.

Just use the upload i made and use those. I have also removed the bad effect from the database.

thanks
sean
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: MrChristmas2000 on February 04, 2013,
It was a great disk tester.  :)

It took a whole lot less time than waiting for my machine to generate all that data.  <pop..
Title: Re: Nutcracker: New command to rebuild gallery on local installs
Post by: plaberge on February 07, 2013,
You are not allowed to view links. Register or Login
Much easier process.

Thanks,

Tom

And much faster!

Thanks,

Paul.