8
$\begingroup$

I have compiled the Bandup software using this command : ./build -compiler gfortran. After that, I tried to follow the tutorial inside the directory bandup-master/tutorial/VASP/example_2_bulk_Si. The second step gave me this error:

Traceback (most recent call last):
  File "/home/e/bjm42/bin/bandup", line 73, in <module>
    run_requested_task(args)
  File "/home/e/bjm42/source/bandup/src/python_interface/bandupy/runners.py", line 73, in run_requested_task
    run_pre_bandup_tool(args)
  File "/home/e/bjm42/source/bandup/src/python_interface/bandupy/runners.py", line 54, in run_pre_bandup_tool
    sys.stdout.write(line)
TypeError: write() argument must be str, not bytes

Do you know how to solve it? Can I unfold bandstructure directly with Bandup without going through the steps mentionned in the tutorial?

$\endgroup$
1
  • 3
    $\begingroup$ This is a common error seen when running Python 2.7 code using Python 3.X. Since Bandup seems to only be supported for Python 2.7 you will either need to install this or edit the source code in various places to make it 3.X compatible. $\endgroup$ – Tyberius Mar 17 at 15:35
4
$\begingroup$

I think your problem was solved in this pull request.

It is not merged yet because it breaks backward compatibility with python3.6 and lower. But if you use 3.7 or higher, you may try to install from that PR, and it should work. If it does not, please report the problem in the comments to that pull request.

You can also ask questions related to the Bandup code on Github in the Issues and in the Comments on Pull Requests in the corresponding repository. That place is now actively monitored by the developers (including me) and other users.

$\endgroup$
3
  • 2
    $\begingroup$ +10 and welcome to this community Stepan! How did you find this question about BandUP so quickly? There's been developers in the past who have tried to get peolpe here to ask questions on their own GitHub page or website, but with more than 15 million users on Stack Exchange, there might always be people preferring to ask here: For example MATLAB has it's own Q/A website called "MATLAB Answers" but there's still so many MATLAB questions asked on StackOverflow. $\endgroup$ – Nike Dattani Mar 19 at 23:34
  • 1
    $\begingroup$ You might consider getting emails when the BandUP tag (mattermodeling.stackexchange.com/questions/tagged/bandup) is used. The instructions on how to do that are here: mattermodeling.meta.stackexchange.com/q/59/5. $\endgroup$ – Nike Dattani Mar 19 at 23:35
  • 2
    $\begingroup$ Actually my colleague pointed me to this question. Thanks for comparing BandUP with MATLAB, but I am afraid that we have less users by a few orders. Asking here of course makes sense, because the problem may be not specific to the particular code, but more general. Yes, I subscribed to the bandup tag, but not many (of a few hundred) users of BandUP will do it. $\endgroup$ – Stepan Tsirkin Mar 22 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.