escaped / django-video-encoding

django-video-encoding helps to convert your videos into different formats and resolutions.
BSD 3-Clause "New" or "Revised" License
116 stars 45 forks source link

Can't run dev environment #18

Closed lifenautjoe closed 4 years ago

lifenautjoe commented 5 years ago

I'm trying to run tests for a feature I want to contribute to the project.

Followed the instructions

poetry develop

Followed by

poetry run test

Getting the following exception

~/Documents/code/open-source/django-video-encoding(master ✗) poetry run pytest
Traceback (most recent call last):
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/manager.py", line 267, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2290, in load
    self.require(*args, **kwargs)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2307, in require
    items = working_set.resolve(reqs, env, installer)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 858, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (setuptools 28.8.0 (/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages), Requirement.parse('setuptools>=30'), {'flake8'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 58, in main
    config = _prepareconfig(args, plugins)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 196, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/helpconfig.py", line 93, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 675, in pytest_cmdline_parse
    self.parse(args)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 845, in parse
    self._preparse(args, addopts=addopts)
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 799, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages/pluggy/manager.py", line 273, in load_setuptools_entrypoints
    message="Plugin %r could not be loaded: %s!" % (ep.name, e),
pluggy.manager.PluginValidationError: Plugin 'flake8' could not be loaded: (setuptools 28.8.0 (/Users/lifenautjoe/Library/Caches/pypoetry/virtualenvs/django-video-encoding-py3.6/lib/python3.6/site-packages), Requirement.parse('setuptools>=30'), {'flake8'})!
lifenautjoe commented 5 years ago

Solved using

poetry add flake8

But now getting django module not found. When trying to install

~/Documents/code/open-source/django-video-encoding(master ✗) poetry add django
Using version ^2.2 for django

Updating dependencies
Resolving dependencies... (2.8s)

[SolverProblemError]
The current project must support the following Python versions: ~2.7 || ^3.5
Because no versions of django match >2.2,<2.2.1 || >2.2.1,<2.2.2 || >2.2.2,<2.2.3 || >2.2.3,<2.2.4 || >2.2.4,<2.2.5 || >2.2.5,<3.0
 and django (2.2) requires Python >=3.5, django is forbidden.
And because django (2.2.1) requires Python >=3.5
 and django (2.2.2) requires Python >=3.5, django is forbidden.
And because django (2.2.3) requires Python >=3.5
 and django (2.2.4) requires Python >=3.5, django is forbidden.
So, because django (2.2.5) requires Python >=3.5
 and django-video-encoding depends on django (^2.2), version solving failed.
lifenautjoe commented 5 years ago

I managed to get the tests running by not using poetry 🙃

escaped commented 4 years ago

Thanks for reporting the issue. I will update master soon, which will hopefully fix your issue as well :)