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

Issues with TEP_tools #1

Open
VArpita opened this issue Apr 15, 2020 · 1 comment
Open

Issues with TEP_tools #1

VArpita opened this issue Apr 15, 2020 · 1 comment

Comments

@VArpita
Copy link

VArpita commented Apr 15, 2020

Hi,
Which version of python is good for your code? It does not work with python 2.7 and 3.6. Some of my errors with python 3.6 are given below. This came out when I compiled "python eltep.py".

Traceback (most recent call last):
File "eltep.py", line 174, in
main()
File "eltep.py", line 126, in main
options = parser.parse_args()
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 1734, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 1766, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 2001, in _parse_known_args
', '.join(required_actions))
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 2391, in error
self.print_usage(_sys.stderr)
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 2361, in print_usage
self._print_message(self.format_usage(), file)
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 2327, in format_usage
return formatter.format_help()
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 282, in format_help
help = self._root_section.format_help()
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 213, in format_help
item_help = join([func(*args) for func, args in self.items])
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 213, in
item_help = join([func(*args) for func, args in self.items])
File "/Users/arpita/anaconda2/envs/py36/lib/python3.6/argparse.py", line 299, in _format_usage
usage = usage % dict(prog=self._prog)
ValueError: unsupported format character 'p' (0x70) at index 8

2-- OPENMX prints transmittance data in the following format that has 10 columns. However your code "eltran.py" gives an error as "The number of column is not proper."

transmission coefficient (%)

index: energy-grid=1, xx=2, xy=3, xz=4, yx=5, yy=6, yz=7, zx=8, zy=9, zz=10

#energy-grid(eV) xx xy xz yx yy yz zx zy zz
0.00000 54.7712624 0.0035605 75.3858312 0.0032551 49.4875763 0.0026457 75.3858388 0.0030068 50.2707027
0.00100 54.7713014 0.0204062 75.3854962 0.0111275 49.4876346 0.0446505 75.3855039 0.0613031 50.2708441

Hope to here from you soon.
Thank you.

@fati1900
Copy link

wha do i do?the erere is

ValueError Traceback (most recent call last)
in
220
221 if name == "main":
--> 222 main()

in main()
164
165 # Set args
--> 166 options = parser.parse_args()
167 if options.tran_file:
168 tran_file = options.tran_file

~/anaconda3/lib/python3.7/argparse.py in parse_args(self, args, namespace)
1747 # =====================================
1748 def parse_args(self, args=None, namespace=None):
-> 1749 args, argv = self.parse_known_args(args, namespace)
1750 if argv:
1751 msg = _('unrecognized arguments: %s')

~/anaconda3/lib/python3.7/argparse.py in parse_known_args(self, args, namespace)
1779 # parse the arguments and exit if there are any errors
1780 try:
-> 1781 namespace, args = self._parse_known_args(args, namespace)
1782 if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR):
1783 args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR))

~/anaconda3/lib/python3.7/argparse.py in parse_known_args(self, arg_strings, namespace)
2014 if required_actions:
2015 self.error(
('the following arguments are required: %s') %
-> 2016 ', '.join(required_actions))
2017
2018 # make sure all required groups had one option present

~/anaconda3/lib/python3.7/argparse.py in error(self, message)
2497 should either exit or raise an exception.
2498 """
-> 2499 self.print_usage(_sys.stderr)
2500 args = {'prog': self.prog, 'message': message}
2501 self.exit(2, _('%(prog)s: error: %(message)s\n') % args)

~/anaconda3/lib/python3.7/argparse.py in print_usage(self, file)
2467 if file is None:
2468 file = _sys.stdout
-> 2469 self._print_message(self.format_usage(), file)
2470
2471 def print_help(self, file=None):

~/anaconda3/lib/python3.7/argparse.py in format_usage(self)
2433 formatter.add_usage(self.usage, self._actions,
2434 self._mutually_exclusive_groups)
-> 2435 return formatter.format_help()
2436
2437 def format_help(self):

~/anaconda3/lib/python3.7/argparse.py in format_help(self)
282 # =======================
283 def format_help(self):
--> 284 help = self._root_section.format_help()
285 if help:
286 help = self._long_break_matcher.sub('\n\n', help)

~/anaconda3/lib/python3.7/argparse.py in format_help(self)
213 self.formatter._indent()
214 join = self.formatter._join_parts
--> 215 item_help = join([func(*args) for func, args in self.items])
216 if self.parent is not None:
217 self.formatter._dedent()

~/anaconda3/lib/python3.7/argparse.py in (.0)
213 self.formatter._indent()
214 join = self.formatter._join_parts
--> 215 item_help = join([func(*args) for func, args in self.items])
216 if self.parent is not None:
217 self.formatter._dedent()

~/anaconda3/lib/python3.7/argparse.py in _format_usage(self, usage, actions, groups, prefix)
299 # if usage is specified, use that
300 if usage is not None:
--> 301 usage = usage % dict(prog=self._prog)
302
303 # if no optionals or positionals are available, usage is just prog

ValueError: unsupported format character 'p' (0x70) at index 8

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

2 participants