bneijt/autotrash

Techincal question

Closed this issue · 4 comments

Hey,

I'm trying to contribute some code to this project.

I'm trying to run the project from the master branch, but I keep getting an error... Should the master branch work? Do you have some simple instructions on how to run it?

P.S. Is the best way to communicate with you?

Thanks...

Hi, github is a great way to communicate with me. I'm not quick to respond, but other people also have a chance to respond if they run into the same issue.

Could you post the command you are trying to run and what the result is?

That response was rather quick :-)

Anyway, this is what I tried... I might be missing something obvious here...

PYTHONPATH=autotrash python3 -m autotrash:

/usr/bin/python3: No module named autotrash.__main__; 'autotrash' is a package and cannot be directly executed

PYTHONPATH=autotrash python2.7 -m autotrash:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "autotrash/__init__.py", line 8, in <module>
    from .app import *
  File "autotrash/app.py", line 61
    def real_file_name(trash_name: str) -> str:
                                 ^
SyntaxError: invalid syntax

python3 init.py:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/requirements.py", line 90, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1617, in parseString
    raise exc
...  
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 2670, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

python2.7 init.py:

Traceback (most recent call last):
  File "__init__.py", line 4, in <module>
    __version__ = get_distribution(__name__).version
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 470, in get_distribution
    dist = Requirement.parse(dist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2988, in parse
    req, = parse_requirements(s)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2935, in parse_requirements
    yield Requirement(line)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2944, in __init__
    raise RequirementParseError(str(e))
pkg_resources.RequirementParseError: Invalid requirement, parse error at "'__main__'"

I've added some documentation on running it from git in a new "Development" section of the readme, let me know if that helps. Closing this for now.

Thanks!