Thanks to visit codestin.com
Credit goes to github.com

Skip to content

demo fails in v0.1.7 #86

@prjemian

Description

@prjemian

the demo crashes out, even after the user cache (C:\Users\Pete\AppData\Roaming\punx) is emptied

PS C:\Users\Pete> pip uninstall -y punx
Uninstalling punx-0.1.5:
  Successfully uninstalled punx-0.1.5
PS C:\Users\Pete> pip install punx
Collecting punx
  Downloading punx-0.1.7-py2.py3-none-any.whl (509kB)
	100% |################################| 512kB 321kB/s
Requirement already satisfied: PyGithub in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: lxml in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: requests in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: numpy in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: pyRestTable in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: h5py in d:\apps\anaconda\lib\site-packages (from punx)
Requirement already satisfied: six in d:\apps\anaconda\lib\site-packages (from h5py->punx)
Installing collected packages: punx
Successfully installed punx-0.1.7
PS C:\Users\Pete> punx -v
0.1.7
PS C:\Users\Pete> punx -h
usage: punx [-h] [-v] {demonstrate,structure,update,validate} ...

Python Utilities for NeXus HDF5 files version: 0.1.7 URL:
http://punx.readthedocs.io

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

subcommand:
  valid subcommands

  {demonstrate,structure,update,validate}
	demonstrate         demonstrate HDF5 file validation
	structure           show structure of HDF5 or NXDL file
	update              update the local cache of NeXus definitions
	validate            validate a NeXus file

Note: It is only necessary to use the first two (or more) characters of any
subcommand, enough that the abbreviation is unique. Such as: ``demonstrate``
can be abbreviated to ``demo`` or even ``de``.
PS C:\Users\Pete> punx demo
console> punx validate d:\apps\anaconda\lib\site-packages\punx\data\writer_1_3.hdf5
Traceback (most recent call last):
  File "d:\apps\anaconda\lib\runpy.py", line 174, in _run_module_as_main
	"__main__", fname, loader, pkg_name)
  File "d:\apps\anaconda\lib\runpy.py", line 72, in _run_code
	exec code in run_globals
  File "D:\Apps\Anaconda\Scripts\punx.exe\__main__.py", line 9, in <module>
  File "d:\apps\anaconda\lib\site-packages\punx\main.py", line 410, in main
	args.func(args)
  File "d:\apps\anaconda\lib\site-packages\punx\main.py", line 119, in func_demo
	func_validate(args)
  File "d:\apps\anaconda\lib\site-packages\punx\main.py", line 182, in func_validate
	validator = validate.Data_File_Validator(args.infile)
  File "d:\apps\anaconda\lib\site-packages\punx\validate.py", line 198, in __init__
	self.nxdl_rules = nxdlstructure.get_nxdl_rules()
  File "d:\apps\anaconda\lib\site-packages\punx\nxdlstructure.py", line 97, in get_nxdl_rules
	__singleton_nxdl_rules__ = nxdl_rules.NxdlRules()
  File "d:\apps\anaconda\lib\site-packages\punx\nxdl_rules.py", line 96, in __init__
	nxdl_xsd = cache.get_nxdl_xsd()             # NXDL structures
  File "d:\apps\anaconda\lib\site-packages\punx\cache.py", line 213, in get_nxdl_xsd
	xsd_file_name = abs_NXDL_filename(NXDL_SCHEMA_FILE)
  File "d:\apps\anaconda\lib\site-packages\punx\cache.py", line 181, in abs_NXDL_filename
	absolute_name = os.path.abspath(os.path.join(cm.default_file_set.path, file_name))
AttributeError: 'NoneType' object has no attribute 'path'
PS C:\Users\Pete>

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions