@@ -91,8 +91,10 @@ def login_to_zooniverse(self, slug_name, email):
91
91
if (valid_email ):
92
92
self .email = email
93
93
self .client = panoptes_client .Panoptes .connect (login = "interactive" )
94
- self .project = Project .find (slug = slug_name )
95
- self .project_id = self .project .id
94
+ if slug_name is not "" :
95
+ self .project = Project .find (slug = slug_name )
96
+ self .project_id = self .project .id
97
+ print ("No project was provided! Run the project-template copy cell if you would like to create a new one." )
96
98
97
99
print ("You now are logged in to the Zooniverse platform." )
98
100
else :
@@ -163,6 +165,9 @@ def write_manifest_file(self, manifest, batch_dir):
163
165
Returns the relative path to the manifest.csv
164
166
"""
165
167
168
+ if self .project is "" :
169
+ print ("Please create or specify a Zooniverse project before attempting to write a manifest file." )
170
+ return
166
171
manifest_filename = 'manifest.csv'
167
172
with open (batch_dir + manifest_filename , 'w' , newline = '' ) as csvfile :
168
173
fieldnames = list (manifest [0 ].keys ())
@@ -318,6 +323,9 @@ def send_image_data(self, subject_set_name, zip_path, **options):
318
323
set is available.
319
324
"""
320
325
326
+ if self .project is "" :
327
+ print ("Please create or specify a Zooniverse project before attempting to send image data!" )
328
+ return
321
329
print ("Send the data to Zooniverse" )
322
330
if len (subject_set_name ) == 0 :
323
331
print ("Please set the subject set name - did not send batch" )
0 commit comments