Tygs / 0bin

Client side encrypted pastebin
https://0bin.net
Do What The F*ck You Want To Public License
1.37k stars 198 forks source link

zerobin.py runserver: Unknown option '--host' #101

Closed wankbank closed 4 years ago

wankbank commented 8 years ago

Using the command:

python zerobin.py --host 0.0.0.0 --port 80 --compressed-static

returns the error:

zerobin.py runserver: Unknown option '--host'

Changing it to:

python zerobin.py host 0.0.0.0 port 8001 compressed-static

returns:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 3099, in run
    server = server(host=host, port=port, **kargs)
  File "/usr/lib/python2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 2723, in __init__
    self.port = int(port)
ValueError: invalid literal for int() with base 10: '0.0.0.0'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 3099, in run
    server = server(host=host, port=port, **kargs)
  File "/usr/lib/python2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 2723, in __init__
...

Non-stop...

Either the docs are incorrect, there's a bug, or I'm just stupid?

ArthurHoaro commented 8 years ago

I have the same issue. It looks like the way 0bin handles parameters has changed. I've found this digging a bit in the code:

def runserver(host='', port='', debug=None, user='', group='',
             settings_file='', compressed_static=None,
             version=False, paste_id_length=None, server="cherrypy"):

So I managed to run 0bin on a custom port with:

python zerobin.py 0.0.0.0 8006

But it doesn't really make any sense:

I'm probably missing something, but yes, the docs are outdated.

sametmax commented 8 years ago

All of this happen because I merged some PR and trusted the content instead of reading it all. I'm guilty of lazyness. I will have to roll back everything, and fix all the bugs one by one.

I'm sorry for the mess, especially since I'm so slow at fixing it.

rugk commented 8 years ago

Any news on this issue?

BTW I also get issues with the command line suggested by @ArthurHoaro:

$ python zerobin.py --host 0.0.0.0 --port 80 --compressed-static
Traceback (most recent call last):
  File "zerobin.py", line 4, in <module>
    from zerobin.cmd import main
  File "/home/zerobin-python/0bin/zerobin/cmd.py", line 12, in <module>
    from sigtools.modifiers import annotate, autokwoargs
ImportError: No module named sigtools.modifiers
$ python zerobin.py 0.0.0.0 8006
Traceback (most recent call last):
  File "zerobin.py", line 4, in <module>
    from zerobin.cmd import main
  File "/home/zerobin-python/0bin/zerobin/cmd.py", line 12, in <module>
    from sigtools.modifiers import annotate, autokwoargs
ImportError: No module named sigtools.modifiers

Can/Do I need to install sigtools.modifiers somehow?

ksamuel commented 4 years ago

This has been fixed in the V2 branch. It will be merged in master and pushed to pypi soon.