Issue on AUTO software, running with Python

Dear community,
I am new to Python and came across it while using the bifurcation software AUTO-07p. As far as I know, it relies on Python in regards of its command line user interface. I am facing following error, which I do not expect to be solved here, but I would be glad for a hint on whether it is something that arises from me as a user not entering the correct commands, or a bug related to installation/configuration and the link between the two programs.
Thank you, best wishes!

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\AUTO\auto\07p\python\", line 1585, in run
    res =
  File "c:\AUTO\auto\07p\python\", line 377, in run
    self.runCommand(command, solution)
  File "c:\AUTO\auto\07p\python\", line 478, in runCommand
    status = self.__runCommand_noredir(command, solution)
  File "c:\AUTO\auto\07p\python\", line 534, in __runCommand_noredir
    self.__write_constants_solution(stdin, solution)
  File "c:\AUTO\auto\07p\python\", line 515, in __write_constants_solution
  File "c:\AUTO\auto\07p\python\", line 1066, in write
  File "c:\AUTO\auto\07p\python\", line 1032, in write_enc
TypeError: write() argument must be str, not bytes

Hi @lanast

it could be a Python version problem. What is your Python interpreter version? And what is the version used by AUTO-07p?

$ python --version
Python 2.7.17

Thank you @vmagnin for the reply. I had posted this post on the Python discourse, but apparently it appeared here, since I was logged in with github .
I am using Python 3.7.6, according to the command line python --version

In AUTO, the same is used:

Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

The manual reads, that Python 2.3 or higher should be used, 2.4 is strongly recommended Python and that 3.x leads to issues with Matplotlib. Could this be the reason? By the way, some of the demos work, while at some the above mentioned error arises.

It seems some files are 11 years old and some recent. It’s possible that there is a mix of Python 2 and Python 3 files. For example, in the demos directory, the *.auto files seem to be Python 2: print foo instructions instead of print(foo)

1 Like

Thanks @vmagnin you were correct, I deinstalled Python 3 and installed 2 and up until now, it runs smooth. Best regards

1 Like