Git Product home page Git Product logo

mbzextract's People

Contributors

davidschlachter avatar ocdude avatar

Stargazers

 avatar  avatar

Watchers

 avatar

mbzextract's Issues

ImportError cannot import name mbz

I am not a Python expert, so hope this makes sense.
Having modified the path at the top of mbextract to the Python interpreter on my system (v2.6 provided by CentOS yum installer), I keep getting the above error.
I tried changing the folder name, and mbz.py is there in the same folder, but it still won't work.
I've tried chmod 777 *.py and that didn't help.

Absolute Path Required for Input File

Hi, when I run the mbzextract it can’t find the input file — unless I provide an absolute path.

Thanks — Andy


$ mbzextract backup.mbz
Parsing the moodle backup file...
Course: Physics 101
Extract files to '/Users/aanderson/Downloads' (y)es, (n)o? y
Traceback (most recent call last):
File "/Applications/anaconda/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Applications/anaconda/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbzextract.py", line 35, in
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbz.py", line 196, in extract
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbz.py", line 319, in open
File "/Applications/anaconda/lib/python3.6/tarfile.py", line 1586, in open
return func(name, filemode, fileobj, **kwargs)
File "/Applications/anaconda/lib/python3.6/tarfile.py", line 1633, in gzopen
fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
File "/Applications/anaconda/lib/python3.6/gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'backup.mbz'


However:

$ mbzextract /Users/aanderson/Downloads/backup.mbz
Parsing the moodle backup file...
Course: Physics 101
Extract files to '/Users/aanderson/Downloads' (y)es, (n)o? y
Skipping forum
Skipping ereservesall
Extracting resource
Skipping videoreservesall
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting page
Extracting url
Extracting url
Extracting url
Extracting url

setup.py does not build/install HTML template files from plugin subdirectories

Python setuptools.find_packages looks for Python modules only, not including template folders in the package list. This can be fixed by adding the option include_package_data=True to the setup() call in setup.py and by creating a file MANIFEST.in in the project directory containing the lines
include mbzextract/plugins/page/templates/*
include mbzextract/plugins/assignment/templates/*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.