-
Notifications
You must be signed in to change notification settings - Fork 39
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
Current master is failing build test on Ubuntu 18.0.4.5 #41
Comments
These errors are due to the failure of the Test case |
I need to find out what's different. $ cd pyexiv2/
$ ls pyexiv2/tests/1.jpg # The test image is here
pyexiv2/tests/1.jpg $ python3
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexiv2
>>> img = pyexiv2.Image('pyexiv2/tests/1.jpg')
>>> img.read_raw_xmp().encode()
b'<?xpacket begin="\xef\xbb\xbf" id="W5M0MpCehiHzreSzNTczkc9d"?> ... |
|
I found that even the XMP ID was not what I expected. Please check if your test images have been modified. Whether the hash value is consistent with this: $ md5sum pyexiv2/tests/1.jpg
81760130b2ed488646c2bf9fd485cb03 1.jpg |
After test..
After build
repo reset..
I just ran it a second time.. and i got a pass After test..
|
So on checkout |
The test case has been executed on multiple platforms: matrix:
os: [ubuntu-18.04, macOS-latest, windows-2019]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] I haven't had this problem before. In a similar situation, Windows handles space characters differently than Linux. |
Well.. it's still important to figure out why I think... |
Can you explain this comment "Windows handles space characters differently than Linux." What exactly, how exactly does this affect the tests? I'm not a mind reader :) |
For example, when Exiv2 outputs image metadata to a terminal on Windows, it shows the newline character as |
The probability that Windows is related to your issue is too low to go into detail. |
@LeoHsiao1 So what you are saying, if i understand your assumption correctly, is that you've written the tests in a way that they will only pass on windows? that's a horrible idea!
so that 4593 will only work in windows ?!?! |
No, my test cases have been executed under 15 circumstances: https://github.com/LeoHsiao1/pyexiv2/actions/runs/448497877 matrix:
os: [ubuntu-18.04, macOS-latest, windows-2019]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] As you can see from the GitHub Actions page, most of the recent test results have passed. |
According to the specifications, the whitespace padding is part of the XMP standard... so any change here means that something has changed and we need to know exactly what.. to set an arbitrary integer for comparison if your test passed without explanation or the original information on how you got that number is really not good enough for other programmers... https://archimedespalimpsest.net/Documents/External/XMP/XMPSpecificationPart3.pdf |
Can you paste in a hexdump of what you are seeing? I'm using..
|
Also... maybe the libexiv is different? which version are you running under Ubuntu 18?
|
NOTE 3 When XMP is embedded within digital files, including white-space padding is sometimes helpful. Doing sofacilitates modification of the XMP packet in-place. The rest of the file is unaffected, which could eliminate a need to rewritethe entire file if the XMP changes in size. Appropriate padding is SPACE characters placed anywhere white space isallowed by the general XML syntax and XMP serialization rules, with a linefeed (U+000A) every 100 characters or so toimprove human display. The amount of padding is workflow-dependent; around 2000 bytes is often a reasonable amount. So something is wrong... if that padding changes under any libexiv2 version and your library... we should know about it.. |
Happy New Year! Do you still have |
My output in the text file..
So here's what I have..
And what you have.....
Checking the result based on an integer of the total length is a horrible idea.. better is to hardcode what values in the XML (parse the XML in Python, it is easy) and check for the strings.. Here is the output of what I'm seeing.. hope it helps.. |
Here's the story.. 4593 is written in your test, 4635 is what I get...
|
The actual value stored in the image is: x:xmptk="Adobe XMP Core 5.6-c128 79.159124, 2016/03/18-14:01:55 " But after Exiv2 parses it, it returns: x:xmptk="XMP Core 4.4.0-Exiv2" Maybe you're using a different version of Exiv2. In summary, |
@LeoHsiao1 You seem to be just repeating exactly what I'm writing :'( |
Well, on the one hand, I'll update the test case so that it can locate the differences. |
That's right... that's what I said :) but... how do we know it's because of 0.25 and not 0.26.4 etc? |
I need to find out where "Adobe XMP Core 5.6-c128 79.159124" is coming from exactly in my system, because I'm on Ubuntu 18 also.. @LeoHsiao1 i'm on ubuntu buster (18.04)
|
Test cases always pass on leo@Leo:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS" |
@LeoHsiao1 I know this, you already said that.. that comment does not add much But I'm running 18.04.5.... i think it is important that this passes (I'm repeating myself too on this point).. otherwise other programmers cannot test/build locally and will waste hours of their life (like I have already) trying to figure out what is wrong |
So it works on
but not
.... not good enough I think.. |
I dont have "Adobe XMP Core" installed on my machine.. which is what is in the original test image (1.jpg).. And maybe "Adobe XMP Core 5.6-c128 79.159124, 2016/03/18-14:01:55" is not installed on the github actions test machine.. so there for the test is false-positive ? |
I dont understand why the EXIF4 header is being re-written.. I think you have not helped to find out the real cause of the problem |
I'm going crazy here, it's like i say something, and then you just repeat what I've already said and we go back to the start :( |
When I look at but in the test output, it fails... that is the problem |
I think the problem is very simple:
|
If you've been using different versions of EXIV2, how do you find out what's causing the problem?
|
In your
Proof...
This test will only pass if something horrible is wrong |
OK.. getting somewhere... but I think your test is weird (#41 (comment)) |
Please change
It is wrong and should not be |
You will need to include the whitespace padding in that change btw.. |
I've included whitespace in reference_data.py without ignoring any characters. Finally, you see the key problem. Exiv2 returns |
OK - do you agree to this
I see in Ubuntu 18.0.4.5 (me) - Can you confirm yes/no that you see this in your |
Yeah, that's what I got with exiv2 : |
@LeoHsiao1 OK, maybe nice idea is to include the output of |
Something in your setup is weird, if what you're saying is true..
because the current 18.0.4 LTS package should be 0.25-3 https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/libexiv2-14_0.25-3.1_amd64.deb.html are you running something weird like |
Well. Download the release version of Exiv2, unpack it.
- Linux64 : <https://www.exiv2.org/archive.html> |
This project gets more insane, Your perspective "We tested for ubuntu 18.04 but using a version of the library that is not shipped lib 18.04" fuck man :/ sorry, this is just completely insane |
I cant contribute here anymore, it's just too insane |
Is there a reason why you insist on a version of a library that is not shipped with that distribution? I bet you did not bother to document that reason? |
Of course, I am using the latest version as possible.
So your thoughts are strange: Why did you stick with the old version 4 years ago? This statement is false: Anyway, when you download a software, you always look to see if the package exists on Pkgs.org, rather than the official website of the software? If you are a beginner, I suggest you download general software in these ways:
|
By the way, the CI process of Exiv2 is running on |
USE THE ACTUAL LIBRARY THAT IS SHIPPED WITH THE DISTRIBUTION THIS STOPS YOU FROM HAVING TO MANUALLY UPGRADE THE LIBRARY WHEN THERE IS A SECURITY ISSUE FOUND! THIS IS THE WHOLE REASON FOR USING THE ACTUAL LIBRARY THAT IS SHIPPED WITH THE DISTRIBUTION !! THERE IS NOTHING WRONG WITH USING AN "OLDER" VERSION IF IT STILL FUNCTIONS FINE! it's all about managing the risks, you cannot expect the site owner to check his exiv version for updates/security issues every night this is insane! |
|
To make matters worse: Exiv2 fixes a number of problems with each version update: https://www.exiv2.org/changelog.html |
I just released v2.4.1 , which adds APIs for handling Comment embedded in images. |
This issue has been automatically closed because there has been no activity for a month. |
Python3.6 on ubuntu here
The text was updated successfully, but these errors were encountered: