WeBWorK Main Forum

Invalid path at FileManager.pm when trying to unarchive course

Invalid path at FileManager.pm when trying to unarchive course

by Allen Sabernick -
Number of replies: 7

We recently completed a migration from WW 2.14 to 2.19.  There were about 10 out of 100 courses that failed to come over to the new version and I am trying to troubleshoot that.  For one of the courses, we tried to use file manager to import and then unarchive the course and when we do so, I get the following:
Invalid path at /opt/app/home/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm line 568.

Context

  • 563: 
  • 564: 		$tar->setcwd($dir->to_string);
  • 565: 
  • 566: 		@members = $tar->list_files;
  • 567: 		for (@members) {
  • 568: 			my $out_file = $dir->child($_)->realpath;
  • 569: 			if ($out_file !~ /^$dir/) {
  • 570: 				push(@outside_files, $_);
  • 571: 				next;
  • 572: 			}
  • 573: 
Any thoughts?
In reply to Allen Sabernick

Re: Invalid path at FileManager.pm when trying to unarchive course

by Glenn Rice -

Are you trying to decompress the course archive in the file manager?  That won't work for unarchiving a course.  You will need to use the "Unarchive Course" page in the admin course.  If you are uploading the course archive in the file manager, make sure that you don't have "Unpack archives automatically" checked.

Although, you also shouldn't get that error if you do try to decompress the file in that way.  If you have server access, then try running "tar tzvf course-archive-file.tar.gz" where course-archive-file.tar.gz is the archive of the course that you are working with.  See what files are in the archive.  It may be that there is a file in the archive that has a path that is causing an issue.

In reply to Glenn Rice

Re: Invalid path at FileManager.pm when trying to unarchive course

by Allen Sabernick -
I do have server access but the reason we were trying the former is because we already tried the unarchive course option. With these 10 or so courses, I first upload the course, but it never shows up to then unarchive it. If I try to tar the course dir into the courses dir, it still never shows up in the unarchive course option. I listed the files in the course tar, but I guess I don't see anything that looks like a problem (although I'm not sure I would know what to look for if there was a problem).
In reply to Allen Sabernick

Re: Invalid path at FileManager.pm when trying to unarchive course

by Andras Balogh -

To unarchive a course the archive file must have .tar.gz extension, and it has to be placed into the /opt/webwork/courses directory. Did you have this?

In reply to Andras Balogh

Re: Invalid path at FileManager.pm when trying to unarchive course

by Andras Balogh -
The one time I try to be helpful ...
In reply to Andras Balogh

Re: Invalid path at FileManager.pm when trying to unarchive course

by Glenn Rice -
You were still helpful. You made me think about the change that might be causing the issue.
In reply to Allen Sabernick

Re: Invalid path at FileManager.pm when trying to unarchive course

by Glenn Rice -

Did you  place the course archive file into the "archives" subdirectory of the admin course?  As of WeBWorK 2.18 the course archives need to be in that subdirectory, and not in the courses directory.

Extracting the course into the courses directory will not unarchive the course either.  That won't restore the database.