I've been trying to get a fix and can't find why the error keeps appearing. Pmin,Pmax,w,fi1 and fi2 have all been assigned finite values

guess=Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2)

When i remove this line from the code, the same error appears at the next line of code, again for no reason I can think of

Edit: Here is the chunk of code I was referring to:

```def Psat(self, T):
pop= self.getPborder(T)
boolean=int(pop)
P1=pop
P2=pop
if boolean:
Pmin = float(min([P1, P2]))
​      Pmax = float(max([P1, P2]))
Tr=T/self.typeMolecule.Tc
w=0.5*(1+scipy.tanh((10**5)*(Tr-0.6))) fi1=0.5*(1-scipy.tanh(8*((Tr**0.4)-1)))```
```     fi2=0.460*scipy.sqrt(1-(Tr-0.566)**2/(0.434**2)+0.494
guess = Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2)
#error here ```
`     solution = scipy.optimize.newton(funcPsat,guess, args=(T,self))`
Aug 13, 2018 in Python 1,773 views

## 1 answer to this question.

You're missing a close paren in this line:

fi2=0.460*scipy.sqrt(1-(Tr-0.566)**2/(0.434**2)+0.494

There are three ( and only two ).

answered Aug 13, 2018 by
• 58,080 points

+1 vote

## How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

## What exactly is invalid syntax error?

please solve this error   def TakeImages():     Id=(text.get())   ...READ MORE

## Python error "SyntaxError: invalid syntax"

but i m getting this ouput: Enter the ...READ MORE

## Python error "TypeError: 'encoding' is an invalid keyword argument for this function"

Trying using the io module for this ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## how do i use the enumerate function inside a list?

Enumerate() method adds a counter to an ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE