Coder Social home page Coder Social logo

Syntax error about orthofinder HOT 4 CLOSED

davidemms avatar davidemms commented on June 20, 2024
Syntax error

from orthofinder.

Comments (4)

davidemms avatar davidemms commented on June 20, 2024

Are you using an old version of python? If you're having problems with the 'with' statement it might be that that's the problem (https://www.python.org/dev/peps/pep-0343/). If so then it's best to install and use version 2.7.

Date: Thu, 6 Aug 2015 02:24:56 -0700
From: [email protected]
To: [email protected]
Subject: [OrthoFinder] Syntax error (#1)

How can I solve this error?

File "orthofinder.py", line 229

with open(clustersFilename, 'rb') as clusterFile, open(newFilename, "wb") as output:

                                                ^

SyntaxError: invalid syntax


Reply to this email directly or view it on GitHub.

from orthofinder.

spenagon avatar spenagon commented on June 20, 2024

I am using python version 2.6.5. When I change lines of with I get another error:
File "orthofinder.py", line 1031
fastaFileIndices = {filename:iSpecies for iSpecies, filename in enumerate(originalFastaFilenames_justNames)}
^
SyntaxError: invalid syntax

from orthofinder.

davidemms avatar davidemms commented on June 20, 2024

Hi spenagon

I've just checked and the dictionary comprehension (the syntax you've posted) was introduced in versions 2.7, released 2010. I will put a note in the README file to tell users that they'll need to use version 2.7 but will download some older versions of python and see if I can make the code backwards compatible with these.

David

from orthofinder.

davidemms avatar davidemms commented on June 20, 2024

Closing this issue now that README now makes clear the python version requirements.

from orthofinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.