Bishan
Bishan

Reputation: 15740

Warning: Task "python_packages" not found. Use --force to continue

I am trying to manually setup this project.

When I run grunt command, I am getting below error.

C:\myworkspace\NASA\worldview>grunt
Warning: Task "python_packages" not found. Use --force to continue.

Aborted due to warnings.

Tried with grunt --force. But not worked.

How could I solve this?

Upvotes: 0

Views: 221

Answers (3)

RobC
RobC

Reputation: 25032

Delete python_packages from line no. 717 of the Gruntfile.js and replace it with exec:python_packages. So it reads:

grunt.registerTask("default", ["exec:python_packages", "update", "build", "config", "site"]);

Then run $ grunt via the CLI again.

When the tasks have completed you'll find the .tar files in the dist folder.


EDIT:

As per @Ryuu Agamaki answer you need to also:

Change line #321 to

command: 'virtualenv python && "python/Scripts/pip" install xmltodict isodate'

python/bin/ doesn't exist on Windows.


Extracting the tar.bz2 files

This done 99% without errors. But stuck at last minute. Here is the log file

The issue is now related to extracting the tar.bz2 files. So the commands on line no.s 330, 335, 340, 345, 350 of the Gruntfile.js will all fail on your system. Your log on line #103 reports:

tar: invalid option -- j

What are those commands doing?

As documented here, the cjCf arguments in the command(s) are:

-c : Create a new archive (or truncate an old one) and write the named files to it.

-j : filter the archive through bzip2

-C : change to directory DIR

-f : use archive file or device ARCHIVE

As per your error log it indicates that your system cannot handle the arguments, particularly the j argument (bzip2).

What next?

I would consider replacing those commands in the Gruntfile.js with an equivalent tar command that you know works on your system (Windows).

Some tools for handling tar.bz2 are listed here - assuming you don't already have the necessary tool. Whether these offer equivalent commands to handle the cjCf arguments I'm not sure. There's also node-uncompress which has command-line commands - which may be worth trying, however, I'm unsure whether it supports cross platform..

The worst case scenario is you may find you have to and omit the calls to the commands, (i.e. those calls to the lines of code previously mentioned, "exec:python_packages" etc, etc), from the Gruntfile.js completely. Then manually extract the tar.bz2 files yourself (using something like 7-zip or WinRAR), and move the resultant files into the appropriate folder.

Clearly non Nix systems weren't considered/tested when developing the tooling for this project.

Upvotes: 0

Ryuu Agamaki
Ryuu Agamaki

Reputation: 3

Try making these changes in Gruntfile.js

Change line #321 to

command: 'virtualenv python && "python/Scripts/pip" install xmltodict isodate'

Change line #717 to

grunt.registerTask("default", ["exec:python_packages", "update", "build", "config", "site"]);

Upvotes: 0

Artur Bieniek
Artur Bieniek

Reputation: 151

Use --force to continue.

Try to run grunt --force. If it's only a warning, it should pass.

Upvotes: 0

Related Questions