Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running setup.sh aborts with Exception: TypeError: __cal__() takes exactly 2 arguments (1 given) #432

Closed
shchukax opened this issue Jan 27, 2017 · 12 comments

Comments

@shchukax
Copy link

I'm attempting to install sync engine on a mint 17 box (based on ubuntu 14.04). Running setup.sh goes through for a bit and then errors out with the following message:

Collecting nylas-production-python>=0.3.9 (from -r requirements.txt (line 1))
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading nylas-production-python-0.3.9.tar.gz
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 412, in run_egg_info
    self.setup_py, self.name,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/usr/local/lib/python2.7/dist-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/usr/local/lib/python2.7/dist-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

How can I get past this error?

@ronisbr
Copy link

ronisbr commented Jan 27, 2017

I am getting the same error and I already reported here: #431

I received no answer from the devs at all.

@mikethebeer
Copy link

mikethebeer commented Jan 28, 2017

I also have this issue. Seems to be an issue with the old installed python version and pip. As a workaround I installed the latest version of python2.7.13 from the tarball.

tar -xzf python-2.7.13.tgz
cd Python/
sudo ./configure
sudo make
sudo make install

after that run sudo ./setup.sh again and it should work fine.

@ronisbr
Copy link

ronisbr commented Jan 29, 2017

@mikethebeer

Installing the latest python version did not solve my problem when running the virtual machine using vagrant.

I modified setup.sh to install the newest python, but it still fails.

@shchukax
Copy link
Author

I tried with Python 2.7.13 and even with Python 3.4 (this doesn't work for a variety of other reasons) - to no avail. What finally did fix it for me is this:

In file /usr/local/lib/python2.7/dist-packages/packaging/requirements.py, line 59 is this one:

MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")

I changed it to

MARKER_EXPR = originalTextFor(MARKER_EXPR(""))("marker")

And that was it - everything went through after that.

@andrepiske
Copy link

@shchukax Thanks, that indeed works!

@grinich grinich closed this as completed Jan 31, 2017
@ghost
Copy link

ghost commented Feb 3, 2017

@shchukax Thanks, it works for me.

@whmountains
Copy link

whmountains commented Feb 10, 2017

How do the nylas guys make this work? I thought vagrant was supposed to give us a 100% identical build.

@grinich can you weight in on this?

@itsjef
Copy link

itsjef commented Feb 14, 2017

In order to fix problems with building the sync-engine, including: #427, #429, #430, #431

Here is what I add into my setup.sh:

export PYTHONPATH=/vagrant:$PYTHONPATH
echo "export PYTHONPATH=/vagrant:$PYTHONPATH" >> /etc/profile
sed -i '59s/MARKER_EXPR()/MARKER_EXPR("")/g' /usr/local/lib/python2.7/dist-packages/packaging/requirements.py

after apt-get -y install ... in line 100

and
easy_install -U pyasn1 setuptools

after pip install ... in line 180

Destroy the vagrant box and run vagrant up again, things seem to work fine for me :)

@rmandar16
Copy link

@shchukax, great solution! It worked! Many thanks!

@hmalshe
Copy link

hmalshe commented Mar 16, 2017

@shchukax great fix! Thanks!

@JNingWei
Copy link

pip install setuptools==33.1.1

@porsche613
Copy link

pip install setuptools==33.1.1 or pip install --upgrade setuptools (when confirmed using a old version) are ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests