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

Improve support for using a docker container #14

Open
MX646464 opened this issue Feb 2, 2022 · 3 comments
Open

Improve support for using a docker container #14

MX646464 opened this issue Feb 2, 2022 · 3 comments

Comments

@MX646464
Copy link

MX646464 commented Feb 2, 2022

Hello piecemaker creators,

I'm trying to get the code to work but I'm getting a BeautifulSoup error. I pasted my output below. If you know how to solve this please let me know!

minimum_piece_size 27.42960341410613
max pieces that will fit 1763
pieces requested 100
pieces adjusted 100
pieces actual 112
piece size 109.71428571428571 x 108.0
0.png added to sprite
1.png added to sprite
10.png added to sprite
100.png added to sprite
101.png added to sprite
102.png added to sprite
103.png added to sprite
104.png added to sprite
105.png added to sprite
106.png added to sprite
107.png added to sprite
108.png added to sprite
109.png added to sprite
11.png added to sprite
110.png added to sprite
111.png added to sprite
12.png added to sprite
13.png added to sprite
14.png added to sprite
15.png added to sprite
16.png added to sprite
17.png added to sprite
18.png added to sprite
19.png added to sprite
2.png added to sprite
20.png added to sprite
21.png added to sprite
22.png added to sprite
23.png added to sprite
24.png added to sprite
25.png added to sprite
26.png added to sprite
27.png added to sprite
28.png added to sprite
29.png added to sprite
3.png added to sprite
30.png added to sprite
31.png added to sprite
32.png added to sprite
33.png added to sprite
34.png added to sprite
35.png added to sprite
36.png added to sprite
37.png added to sprite
38.png added to sprite
39.png added to sprite
4.png added to sprite
40.png added to sprite
41.png added to sprite
42.png added to sprite
43.png added to sprite
44.png added to sprite
45.png added to sprite
46.png added to sprite
47.png added to sprite
48.png added to sprite
49.png added to sprite
5.png added to sprite
50.png added to sprite
51.png added to sprite
52.png added to sprite
53.png added to sprite
54.png added to sprite
55.png added to sprite
56.png added to sprite
57.png added to sprite
58.png added to sprite
59.png added to sprite
6.png added to sprite
60.png added to sprite
61.png added to sprite
62.png added to sprite
63.png added to sprite
64.png added to sprite
65.png added to sprite
66.png added to sprite
67.png added to sprite
68.png added to sprite
69.png added to sprite
7.png added to sprite
70.png added to sprite
71.png added to sprite
72.png added to sprite
73.png added to sprite
74.png added to sprite
75.png added to sprite
76.png added to sprite
77.png added to sprite
78.png added to sprite
79.png added to sprite
8.png added to sprite
80.png added to sprite
81.png added to sprite
82.png added to sprite
83.png added to sprite
84.png added to sprite
85.png added to sprite
86.png added to sprite
87.png added to sprite
88.png added to sprite
89.png added to sprite
9.png added to sprite
90.png added to sprite
91.png added to sprite
92.png added to sprite
93.png added to sprite
94.png added to sprite
95.png added to sprite
96.png added to sprite
97.png added to sprite
98.png added to sprite
99.png added to sprite
Processing 'raster':
Format 'img' for sprite 'raster' needs rebuild...
0.jpg added to sprite
1.jpg added to sprite
10.jpg added to sprite
100.jpg added to sprite
101.jpg added to sprite
102.jpg added to sprite
103.jpg added to sprite
104.jpg added to sprite
105.jpg added to sprite
106.jpg added to sprite
107.jpg added to sprite
108.jpg added to sprite
109.jpg added to sprite
11.jpg added to sprite
110.jpg added to sprite
111.jpg added to sprite
12.jpg added to sprite
13.jpg added to sprite
14.jpg added to sprite
15.jpg added to sprite
16.jpg added to sprite
17.jpg added to sprite
18.jpg added to sprite
19.jpg added to sprite
2.jpg added to sprite
20.jpg added to sprite
21.jpg added to sprite
22.jpg added to sprite
23.jpg added to sprite
24.jpg added to sprite
25.jpg added to sprite
26.jpg added to sprite
27.jpg added to sprite
28.jpg added to sprite
29.jpg added to sprite
3.jpg added to sprite
30.jpg added to sprite
31.jpg added to sprite
32.jpg added to sprite
33.jpg added to sprite
34.jpg added to sprite
35.jpg added to sprite
36.jpg added to sprite
37.jpg added to sprite
38.jpg added to sprite
39.jpg added to sprite
4.jpg added to sprite
40.jpg added to sprite
41.jpg added to sprite
42.jpg added to sprite
43.jpg added to sprite
44.jpg added to sprite
45.jpg added to sprite
46.jpg added to sprite
47.jpg added to sprite
48.jpg added to sprite
49.jpg added to sprite
5.jpg added to sprite
50.jpg added to sprite
51.jpg added to sprite
52.jpg added to sprite
53.jpg added to sprite
54.jpg added to sprite
55.jpg added to sprite
56.jpg added to sprite
57.jpg added to sprite
58.jpg added to sprite
59.jpg added to sprite
6.jpg added to sprite
60.jpg added to sprite
61.jpg added to sprite
62.jpg added to sprite
63.jpg added to sprite
64.jpg added to sprite
65.jpg added to sprite
66.jpg added to sprite
67.jpg added to sprite
68.jpg added to sprite
69.jpg added to sprite
7.jpg added to sprite
70.jpg added to sprite
71.jpg added to sprite
72.jpg added to sprite
73.jpg added to sprite
74.jpg added to sprite
75.jpg added to sprite
76.jpg added to sprite
77.jpg added to sprite
78.jpg added to sprite
79.jpg added to sprite
8.jpg added to sprite
80.jpg added to sprite
81.jpg added to sprite
82.jpg added to sprite
83.jpg added to sprite
84.jpg added to sprite
85.jpg added to sprite
86.jpg added to sprite
87.jpg added to sprite
88.jpg added to sprite
89.jpg added to sprite
9.jpg added to sprite
90.jpg added to sprite
91.jpg added to sprite
92.jpg added to sprite
93.jpg added to sprite
94.jpg added to sprite
95.jpg added to sprite
96.jpg added to sprite
97.jpg added to sprite
98.jpg added to sprite
99.jpg added to sprite
Processing 'raster_with_padding':
Format 'img' for sprite 'raster_with_padding' needs rebuild...
Traceback (most recent call last):
File "/usr/local/bin/piecemaker", line 8, in
sys.exit(piecemaker())
File "/usr/local/lib/python3.7/dist-packages/piecemaker/script.py", line 203, in piecemaker
pieces.generate_resources()
File "/usr/local/lib/python3.7/dist-packages/piecemaker/base.py", line 148, in generate_resources
vector_dir=self._vector_dir,
File "/usr/local/lib/python3.7/dist-packages/piecemaker/sprite.py", line 166, in generate_sprite_svg_clip_paths
select_first_g = svg.select(':root > g', limit=1)
File "/usr/local/lib/python3.7/dist-packages/bs4/element.py", line 1497, in select
"A pseudo-class must be prefixed with a tag name.")
ValueError: A pseudo-class must be prefixed with a tag name.

@jkenlooper
Copy link
Owner

This may be because python3.7 is being used. Try using at least python version 3.8 instead when installing with pip.

If you are on a linux distribution like Ubuntu 20.04 you can look at the Dockerfile to get an idea of what software dependencies are needed. The "Installing" section of the README also describes these, but doesn't specifically mention that python 3.8 is needed. I'm pretty sure the python version on Ubuntu 20.04 is python 3.8.

If that doesn't work or you are unable to install a newer python version, then maybe try building a docker image and running it that way.

Hope that helps.

@MX646464
Copy link
Author

MX646464 commented Feb 4, 2022

Hey @jkenlooper thanks for your response. I tried building the docker image but I keep getting many errors, which I think comes from my lack of understanding/knowledge:

=> CACHED [11/15] RUN chown -R piecemaker:piecemaker /build 0.0s
=> ERROR [12/15] RUN chown -R piecemaker:piecemaker /out 0.3s

[12/15] RUN chown -R piecemaker:piecemaker /out:
#16 0.312 chown: cannot access '/out': No such file or directory

I'm pretty unfamiliar with Docker so unfortunately I'm not sure this approach will work for me. Maybe a Dockerfile specifying a Windows PATH for the piecemaker files stored in a directory (C:\Users\User1\Desktop\piecemaker\build) would help.

I'd prefer to use Google Colab but only python 3.7 can be installed. I've been trying to troubleshoot and understand how to fix the "ValueError: A pseudo-class must be prefixed with a tag name." error above, but I'm not sure I'll be able to myself.

I'd really like to use your awesome piecemaker 0.4.3, so I'll keep trying to figure out a solution that works for me.

@jkenlooper jkenlooper changed the title ValueError: A pseudo-class must be prefixed with a tag name. Improve support for using a docker container Feb 4, 2022
@jkenlooper
Copy link
Owner

Thanks for trying to get this to work. I've reopened this issue to improve the documentation and possibly clean up the Dockerfile to be more compatible on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants