hjalti / mossum Goto Github PK
View Code? Open in Web Editor NEWMoss summarizer
License: MIT License
Moss summarizer
License: MIT License
It seems that the mossum uses the third <p>
tag of MOSS result page as the name of output picture, if presented in HTML DOM. (lines 209 & 210)
if len(ps) >= 2:
name = ps[2].text.strip()
But MOSS uses <p>
tags to show errors, too. In situations that there isn't any <p>title</p>
in the result page and there are some <p>error</p>
there, mossum picks up a wrong statement as the png filename
and in some special situations prevent mossum from making output at all.
e.g.
...
</TABLE>
<HR>
Any errors encountered during this query are listed below.<p>Could not open file "2/"
<p>Could not open file "2/"
<p></BODY>
</HTML>
I suggest it would be better to remove those two lines from code.
When testing mossum for the first time, I've always got the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1915, in create
working_dir=tmp_dir,
File "/usr/local/lib/python3.7/site-packages/pydot.py", line 136, in call_graphviz
**kwargs
File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/mossum", line 9, in <module>
mossum.main()
File "/usr/local/lib/python3.7/site-packages/mossum/mossum.py", line 291, in main
image(res, i+1)
File "/usr/local/lib/python3.7/site-packages/mossum/mossum.py", line 262, in image
graph.write(filename, format=args.format)
File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1817, in write
s = self.create(prog, format, encoding=encoding)
File "/usr/local/lib/python3.7/site-packages/pydot.py", line 1922, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path.
Apparantly, installing graphviz on Macos (brew install graphviz
) or Linux distributions (apt-get install graphviz
) will fix this issue
(Not tested on Windows)
I am trying to generate mossum results on a Windows 10 PC. but if I run the following command on Powershell
PS C:\Users\User> mossum http://moss.stanford.edu/results/x/xxxxxxxxx/
it shows nothing, rather the mossum.py
opens in VS Code.
I have also tried with CMD, but CMD doesn't recognize mossum
as a command. I have Graphviz
installed on my PC.
I get the following exception on Linux and Windows when attempting to generate an image. It might be something simple.
`$ mossum http://moss.stanford.edu/results/xxxxxxxxx/index.html
Generating image for moss_xx-xx-xxxx_xxxxxx
Traceback (most recent call last):
File "C:\Users<user name>\Anaconda3\lib\site-packages\pydot.py", line 1878, in create
stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "C:\Users<user name>\Anaconda3\lib\subprocess.py", line 947, in init
restore_signals, start_new_session)
File "C:\Users<user name>\Anaconda3\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users//Anaconda3/Scripts/mossum", line 9, in
mossum.main()
File "C:\Users<user name>\Anaconda3\lib\site-packages\mossum\mossum.py", line 251, in main
image(res)
File "C:\Users<user name>\Anaconda3\lib\site-packages\mossum\mossum.py", line 222, in image
graph.write(filename, format=args.format)
File "C:\Users<user name>\Anaconda3\lib\site-packages\pydot.py", line 1774, in write
s = self.create(prog, format)
File "C:\Users<user name>\Anaconda3\lib\site-packages\pydot.py", line 1883, in create
prog=prog))
Exception: "dot.exe" not found in path.`
FactoryBoy/factory_boy#334
Deals with the renaming of fake-factory to Faker. Would
be great if you fix the setup.py file accordingly.
Thanks.
Hi.
I run
$ mossum http://moss.stanford.edu/results/XYZ
Generating image for moss_02-03-2018_223646
DONE
but it only generated a 11x11px
white image, any idea what can be wrong?
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin//mossum", line 9, in <module>
mossum.main()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mossum/mossum.py", line 294, in main
image(res, i+1, label=args.title)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mossum/mossum.py", line 266, in image
graph.write(filename, format=args.format)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydot/core.py", line 1662, in write
s = self.create(prog, format, encoding=encoding)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydot/core.py", line 1753, in create
stdout_data, stderr_data, process = call_graphviz(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydot/core.py", line 133, in call_graphviz
process = subprocess.Popen(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'dot'
I tried installing mossum on my Mac and got some errors.
% pip install git+https://github.com/hjalti/mossum@master
Collecting git+https://github.com/hjalti/mossum@master
Cloning https://github.com/hjalti/mossum (to master) to /private/var/folders/yf/s_886ncd4qv743xbq14s6ck80000gp/T/pip-xVZQI4-build
Requirement already satisfied: beautifulsoup4>=4.3.2 in /Library/Python/2.7/site-packages (from mossum==0.1.3)
Collecting Faker>=0.4.2 (from mossum==0.1.3)
Using cached Faker-0.8.11-py2.py3-none-any.whl
Collecting html5lib>=0.999 (from mossum==0.1.3)
Using cached html5lib-1.0.1-py2.py3-none-any.whl
...
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=2.3.0->mossum==0.1.3)
Using cached scandir-1.6.tar.gz
Building wheels for collected packages: scandir
Running setup.py bdist_wheel for scandir ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yf/s_886ncd4qv743xbq14s6ck80000gp/T/pip-build-6HC5Fj/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/yf/s_886ncd4qv743xbq14s6ck80000gp/T/tmpChGnhVpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-intel-2.7
copying scandir.py -> build/lib.macosx-10.13-intel-2.7
running build_ext
building '_scandir' extension
creating build/temp.macosx-10.13-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _scandir.c -o build/temp.macosx-10.13-intel-2.7/_scandir.o
<built-in>:0: error: Unknown value ‘10.13’ of -mmacosx-version-min
_scandir.c: In function ‘_pystat_fromstructstat’:
_scandir.c:625: error: ‘struct stat’ has no member named ‘st_birthtimespec’
_scandir.c:627: error: ‘struct stat’ has no member named ‘st_birthtimespec’
<built-in>:0: error: Unknown value ‘10.13’ of -mmacosx-version-min
_scandir.c: In function ‘_pystat_fromstructstat’:
_scandir.c:625: error: ‘struct stat’ has no member named ‘st_birthtimespec’
_scandir.c:627: error: ‘struct stat’ has no member named ‘st_birthtimespec’
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /var/folders/yf/s_886ncd4qv743xbq14s6ck80000gp/T//ccra9I0N.out (No such file or directory)
error: command 'cc' failed with exit status 1
----------------------------------------
Failed building wheel for scandir
Running setup.py clean for scandir
Failed to build scandir
Thoughts on this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.