question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"No idea what *something* is!" after running fabric2

See original GitHub issue

I am new to fabric and having trouble getting it to work. I installed it via pip3 first when I tried to run it I was getting Command ‘fab’ not found, I eventually found it in /home/me/.local/bin/fab2.

Is this the correct place?

Second whenever I run it like so

/home/me/.local/bin/fab2 version

I get

(2, 3, 1)
2.3.1
No idea what 'version' is!
import fabric
if hasattr(fabric, '__version__'):
    # For fabric2
    print(fabric.__version_info__)
    print(fabric.__version__)   # for a version tuple
else:
    # for fabric1
    from fabric.api import *
    print(env.version)

Is /home/me/.local/bin/fab2 the correct location? What is ‘No idea what ‘version’ is!’ why does it show up?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:18

github_iconTop GitHub Comments

36reactions
standaloneSAcommented, Aug 21, 2018

@ajmcateer, I had this problem as well. The issue is that thew new fabric task method (as discussed here - http://docs.fabfile.org/en/1.14/usage/tasks.html) is to use the @task decorator. The equivalent "Hello World’ example is:

from fabric import task

@task
def hello(ctx):
  print("Hello World")

Running ‘fab hello’ yields the expected output.

5reactions
ryanjdilloncommented, Jul 12, 2019

If your issue is that you receive this error for a task argument, it may be that you are not passing the argument in its correct format, but as how you have your task named.

fab mytask --task-name value

not

fab mytask --task_name value

I realize this isn’t spot on the issue, but since I ended up here, I’ll leave this for anybody else who has my same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New to python fabric and not able to run basic code
I have a basic code which doesn't run: def hello(): print ...
Read more >
fab options and arguments - Fabric documentation
In its most simple form, fab may be called with no options at all, and with one or ... where everything after the...
Read more >
Fabric - Read the Docs
err = "No idea how to get disk space on {}! ... menting a new command-runner method recently added to Invoke; this prevents...
Read more >
Re: [Fab-user] Not having much luck with your initial examples.
I have seen that error before too. It means I am trying to execute Fabric <2 code with Fabric 2+ library. I can...
Read more >
How Big Is A Yard Of Fabric? (+Yardage Conversion Chart)
But that didn't help because I had no idea about inches, either! ... When you buy fabric in yards, they don't measure the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found